Syntax
winrm g[et] | s[et] | c[reate] | d[elete] | e[numerate] |
i[nvoke] | id[entify] | quickconfig | configSDDL | helpmsg
Retrieve instances of RESOURCE_URI:
winrm get RESOURCE_URI [-SWITCH:VALUE [-SWITCH:VALUE] ...]
winrm get winrm/config
winrm get winrm/config/client
winrm get winrm/config/service
Modify settings in RESOURCE_URI:
winrm set RESOURCE_URI [-SWITCH:VALUE [-SWITCH:VALUE] ...]
[@{KEY="VALUE"[;KEY="VALUE"]}]
[-file:VALUE]
Spawn an instance of RESOURCE_URI:
winrm create RESOURCE_URI [-SWITCH:VALUE [-SWITCH:VALUE] ...]
[@{KEY="VALUE"[;KEY="VALUE"]}]
[-file:VALUE]
Control remote access to WinRM resources, launch a GUI to edit security settings.
winrm configsddl RESOURCE_URI
Enable this machine for remote management.
winrm quickconfig [-quiet] [-transport:VALUE]
This will start the WinRM service, set the service to auto start, create
a listener and enable an http firewall exception for WS-Management traffic
-q[uiet] Don’t prompt for confirmation.
-transport:VALUE Perform quickconfig for either http or https. Default = http.
List instances of RESOURCE_URI:
winrm enumerate RESOURCE_URI [-ReturnType:Value] [-Shallow]
[-BasePropertiesOnly] [-SWITCH:VALUE [-SWITCH:VALUE] ...]
Remove an instance of RESOURCE_URI:
winrm delete RESOURCE_URI [-SWITCH:<em>VALUE</em> [-SWITCH:VALUE] ...]
Execute method specified by ACTION on target object specified by RESOURCE_URI
winrm invoke ACTION RESOURCE_URI [-SWITCH:VALUE [-SWITCH:VALUE] ...]
[@{KEY="<em>VALUE</em>"[;KEY="VALUE"]}]
[-file:VALUE]
Display error message associate with the error code.
winrm helpmsg errorcode
Key
-a[uthentication]:VALUE
The authentication mechanism to use when communicating
with the remote machine.
-defaultCreds Allow implicit credentials when Negotiate is used.
Remote HTTPS operations for trusted machines.
-dialect:VALUE Dialect of the filter expression for enumeration or fragment.
Example: Use a WQL query
-dialect:http://schemas.microsoft.com/wbem/wsman/1/WQL
Example: Use XPATH for filtering with enumeration or fragment get/set.
-dialect:https://www.w3.org/TR/1999/REC-xpath-19991116
-encoding:VALUE The encoding type when talking to remote machine (see -remote).
Possible options are "utf-8" (the default) or "utf-16".
-f[ormat]:FORMAT The format of output. FORMAT can be "xml",
"pretty" (better formatted XML), or "text".
-r[emote]:VALUE Specify the identifier of a remote endpoint/system.
This can be a simple host name or a complete URL.
-skipCAcheck The certificate issuer need not be a trusted root authority.
Remote HTTPS operations for trusted machines.
-skipCNcheck The certificate common name (CN) of the server need not match
the hostname of the server. HTTPS operations for trusted machines.
-skipRevocationcheck Do not check the revocation status of the server certificate.
Remote HTTPS operations for trusted machines.
-SPNPort Append port number to the Service Principal Name (SPN) of the
remote server.
Service principal name is used when Negotiate or Kerberos authentication
mechanism is in use.
-timeout:<em>MS</em> Timeout in milliseconds. Limits duration of corresponding operation.
Default timeout can be configured by:
winrm set winrm/config @{MaxTimeoutms="XXXXXX"}
Where XXXXXX is an integer indicating milliseconds.
-file:VALUE
@{KEY="VALUE"[;KEY="VALUE"]}
Input from an XML file or via key/value pairs.
Applies to set, create, and invoke operations
-fragment:VALUE Specify a section inside the instance XML that is to be updated or
retrieved for the given operation.
Example: Get the status of the spooler service
winrm get wmicimv2/Win32_Service?name=spooler -fragment:Status/text()
-options:{KEY="<em>VALUE</em>"[;KEY="<em>VALUE</em>"]}
Key/value pairs for provider-specific options.
Example:
-options:{key1="value1";key2=$null}