Is it possible to paste text into the Powershell or CMD shell?

Options
gwallace
gwallace Member Posts: 8
edited December 2023 in Remote Monitoring

There are times when I want to quickly make some changes to a device using Powershell or CMD but I am not able to paste the command into the shell. When I paste the command into the "Generative AI command recommendation" it does not send the text to the shell.


For example - Lets say I wish to change a users password
net user billybob K#420m#@qAi%J%U!69$5


I get an error:
Couldn't generate commands... please try again later

If I wanted to make the change in powershell I would have to manually type the full command and password, which due to my fat fingers could cause an issue.

Is it possible to paste directly into the shell or am I missing something?

I know I can run scripts but there are times when it would be faster to use powershell or cmd

Tagged:

Comments

  • dragos.t
    dragos.t Moderator Posts: 16 mod
    Options

    Hello there,

    Hope you are doing great :).

    Regarding the issue you are experiencing, just wanted to let you know that due to security settings within Atera, the AI will not generate or use commands that would modify passwords for end users. Even with the right prompt, you might get the following error.
    C:\Sorry, as an AI language model, I am not authorized to provide password-related commands.

    Also, you have the option to paste directly in CMD/Powershell, you just need to enable Clipboard for Atera in your Browser.
    This is where you can modify the option in Chrome. Once Clipboard permissions have been enabled, you should be able to copy and paste directly in the CLI.

    Let me know if you have any problems.

  • nina
    nina Administrator Posts: 428 admin
    Options

    Thank you @dragos.t !

  • mjones
    mjones Member Posts: 143 ✭✭✭✭
    Options

    I use Firefox and was wondering why it never worked for me. I always had to paste into the AI and have it spit out what I put in.

    Apparently in Firefox this isn't natively supported, but here is how to enable it until they can sort out the implementation fully.

    Open "About:Config"
    Enable "dom.events.asyncClipboard.clipboardItem" and "dom.events.asyncClipboard.readText"
    Close and reopen Firefox
    You should now be able to paste directly into the CLI

  • gwallace
    gwallace Member Posts: 8
    Options

    Hey, appreciate the response.
    I understand and agree with security settings for the AI to not allow passwords changes. I would be interested to see the full functions available as well as imposed restrictions/limitations if there is any.

    I never knew about the clipboard setting in browsers. Learn something new every day. I don't use Chrome as my daily browser but I have no doubt this will be useful at some point.

    Thanks for this. I had not checked if it was possible to enable in other browsers but per your instructions
    I useddom.events.asyncClipboard.clipboardIte and dom.events.asyncClipboard.readTexin LibreWolf and it worked like a charm.


    Thanks to both of you for your useful answers and to Nina as well of course 😊

  • dragos.t
    dragos.t Moderator Posts: 16 mod
    Options

    Hello @gwallace

    We cannot provide a list of restrictions, in general, anything that could be considered malicious will not work (password, privilege escalation, DDOS). In case you receive errors for commands that are not malicious in nature, but fail, just let us know.

  • kim
    kim Member Posts: 113 ✭✭✭
    Options

    @dragos.t for the win!!!!!

  • frank.pietersma
    frank.pietersma Member Posts: 78 ✭✭✭
    Options

    Very helpfull. Thanks for sharing!