1 \nUSAGE\n=====\n(ALL UPPER-CASE = value that must be supplied by user.)\n\nwinrs [-/SWITCH[:VALUE]] COMMAND\n\nCOMMAND - Any string that can be executed as a command in the cmd.exe shell.\n\nSWITCHES\n========\n(All switches accept both short form or long form. For example both -r and \n-remote are valid.)\n\n-r[emote]:ENDPOINT - The target endpoint using a NetBIOS name or the standard connection URL: [TRANSPORT://]TARGET[:PORT]. If not specified \n-r:localhost is used.\n\n-un[encrypted] - Specify that the messages to the remote shell will not be encrypted. This is useful for troubleshooting, or when the network traffic is already encrypted using ipsec, or when physical security is enforced. By default the messages are encrypted using Kerberos or NTLM keys. This switch is ignored when HTTPS transport is selected. \n\n-u[sername]:USERNAME - Specify username on command line. If not specified the tool will use Negotiate authentication or prompt for the name. \nIf -username is specified, -password must be as well.\n\n-p[assword]:PASSWORD - Specify password on command line. If -password is not specified but -username is the tool will prompt for the password. If -password is specified, -user must be specified as well.\n\n-t[imeout]:SECONDS - This option is deprecated. \n\n-d[irectory]:PATH - Specifies starting directory for remote shell. If not specified the remote shell will start in the user's home directory defined by the environment variable %USERPROFILE%.\n\n-env[ironment]:STRING=VALUE - Specifies a single environment variable to be set when shell starts, which allows changing default environment for shell. Multiple occurrences of this switch must be used to specify multiple environment variables.\n\n-noe[cho] - Specifies that echo should be disabled. This may be necessary to ensure that user's answers to remote prompts are not displayed locally. By default echo is "on".\n\n-nop[rofile] - specifies that the user's profile should not be loaded. By default the server will attempt to load the user profile. If the remote user is not a local administrator on the target system then this option will be required (the default will result in error).\n\n-? - Help\n\nTo terminate the remote command the user can type Ctrl-C or Ctrl-Break, which will be sent to the remote shell. The second Ctrl-C will force termination of winrs.exe.\n\nTo manage active remote shells or WinRS configuration, use the WinRM tool. The URI alias to manage active shells is shell/cmd. The URI alias for WinRS configuration is winrm/config/winrs. Example usage can be found in the WinRM tool by typing "WinRM -?".\n\nExamples:\nwinrs -r:https://myserver.com command\nwinrs -r:myserver command\nwinrs -r:http://127.0.0.1 command\nwinrs -r:http://169.51.2.101:80 -unencrypted command\nwinrs -r:https://[::FFFF:129.144.52.38] command\nwinrs -r:http://[1080:0:0:0:8:800:200C:417A]:80 command\nwinrs -r:https://myserver.com -t:600 -u:administrator -p:$%fgh7 ipconfig\nwinrs -r:myserver -env:PATH="%PATH%;c:\tools" -env:TEMP=d:\temp config.cmd\nwinrs -r:myserver netdom join myserver /domain:testdomain /userd:johns /passwordd:$%fgh789\n
2 Winrs error: Command is missing
3 Winrs.exe: Unrecognized switch "
4 Winrs.exe: Invalid Timeout Value "
5 Winrs.exe: Invalid Encrypt Value "
6 Winrs.exe: duplicate switch "
7 Winrs error: remote shell has been closed due to timeout or deleted by the administrator. The current command has been terminated.
8 Use "winrs -?" to obtain the usage information
9 winrs.exe: Missing directory value
10 winrs.exe: Missing environment value
11 winrs.exe: Missing timeout value
12 winrs.exe: Missing username value
13 winrs.exe: Missing password value
14 winrs.exe: Missing remote value
15 Winrs.exe: The "-noecho" switch can be used for character file input only, it cannot be used with pipes.