I'm trying to call WinRS for some of our automated scripts. I've run into an issue when attempting to pass a password with spaces for the -p argument.
For example,
winrs http://server:5985 -p:my password -u:user dir
fails with the message
winrs.exe:The parameter is incorrect.
Quoting the argument doesn't seem to help,
winrs http://server:5985 -p:"my password" -u:user dir
it fails with the message
Winrs error:Access is denied.
If I type in my password, everything works as expected, however this is not an option for the workflow we're building.
Is it possible to pass a password containing spaces to WinRS? If not, is there a workaround that does not include manual typing?
The host needs to be prefixed by "-r:" like so:
winrs -r:http://server:5985 -p:my password -u:user "dir"