It appears that sometimes it assumes a parameter is part of the command and other times it does not. I use InVoke-NcSsh a few times in my scripts and usually any options within the command are not seen as a parameter to the InVoke-NcSsh commandlet.
The other thing to note in your scripting is that you had a single backslach '\'. In most scripting languages the backslash is interpreted as the start of an escape sequence. In order to have a backslash be interpreted not as the escape sequence, you need to use a double backslash '\\'.
Hello everyone, thanks in advance for your assistance. I hope someone can assist me here. I am also running into the same issue here, I am trying to create an admin user here with full previleages, I keppt running into these errors. I have tried multiple ways, still getting the smae errors. Can someone be kind enough to help here These are my errors.