<div dir="ltr" style="text-align: left;"><span style="font-family: Times, ";Times New Roman";, serif;">WinRM provides a command line interface that can be used to perform common management tasks, and also provides a scripting API so you can write your own Windows Scripting Host based scripts. In the background, WinRM relies on management data provided by WMI; however it makes the exchange of data much easier by utilizing the HTTP protocol. It uses SOAP (Simple Object Access Protocol) over HTTP and HTTPS, and thus is considered a firewall-friendly protocol</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">You must modify the WinRM configuration by running commands on the WinRM host machine. You can use the same machine as both the WinRM service and WinRM client.</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"></span></p>
<p><strong><span style="font-family: Times, ";Times New Roman";, serif;">Procedure</span></strong><br /><span style="font-family: Times, ";Times New Roman";, serif;"></span><br /><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;">1. Run the following command to set the default WinRM configuration values.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; c:>; winrm quickconfig</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">2. (Optional) Run the following command to check whether a listener is running, and verify the default ports.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; c:>; winrm e winrm/config/listener</span><br /><span style="font-family: Times, ";Times New Roman";, serif;">The default ports are <span style="color: red;">5985</span> for HTTP, and <span style="color: red;">5986</span> for HTTPS.</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">3. Enable basic authentication on the WinRM service.</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"> ; ; ; a. Run the following command to check whether basic authentication is allowed.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; ; ;  ; c:>; winrm get winrm/config</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"> ;  ; b. Run the following command to enable basic authentication.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; ; ; ; c:>; winrm set winrm/config/service/auth @{Basic=&#8221;true&#8221;}</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">4. Run the following command to allow transfer of unencrypted data on the WinRM service.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; c:>; winrm set winrm/config/service @{AllowUnencrypted=&#8221;true&#8221;}</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;">5. Enable basic authentication on the WinRM client.</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"> ; ; ; a. Run the following command to check whether basic authentication is allowed.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; ; ; ; ; c:>; winrm get winrm/config</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"> ; ; ; b. Run the following command to enable basic authentication.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; ; ; ; ; c:>; winrm set winrm/config/client/auth @{Basic=&#8221;true&#8221;}</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">6. Run the following command to allow transfer of unencrypted data on the WinRM client.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; c:>; winrm set winrm/config/client @{AllowUnencrypted=&#8221;true&#8221;}</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;">7. If the WinRM host machine is in an external domain, run the following command to specify the trusted hosts.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; ; ; c:>; winrm set winrm/config/client @{TrustedHosts=&#8221;host1, host2, host3&#8243;}</span></p>
<p><span style="font-family: Times, ";Times New Roman";, serif;">8. Run the following command to test the connection to the WinRM service.</span><br /><span style="background-color: orange; font-family: Times, ";Times New Roman";, serif;"> ; ; ; c:>; winrm identify -r:http://winrm_server:5985 -auth:basic -u:user_name -p:password -encoding:utf-8</span></p>
<p><strong><span style="font-family: Times, ";Times New Roman";, serif;">You might need to install WinRM depending on the operating system as listed in the following table:</span></strong><br /><span style="font-family: Times, ";Times New Roman";, serif;"></span><br /><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;">Operating System ; ; ; ; ; WinRM</span><br /><span style="font-family: Times, ";Times New Roman";, serif;">Windows 7 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; WinRM 2.0 installed by default.</span><br /><span style="font-family: Times, ";Times New Roman";, serif;">Vista ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; WinRM 1.1 installed by default.</span><br /><span style="font-family: Times, ";Times New Roman";, serif;">Windows XP ; ; ; ; ; ; ; ; ; ; ; ; ;WinRM not installed by default</span><br /><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"><br /></span><span style="font-family: Times, ";Times New Roman";, serif;"></span></div>

