If you have not already enabled PowerShell Remoting and want to use the HTTP protocol, follow these steps.

About this task

If you plan to use the HTTPS protocol instead, skip this section and see Enable HTTPS Protocol for PowerShell Remoting.

Procedure

To use HTTP for PowerShell remoting, run the following command on the host:
winrm quickconfig

Results

Port 5985 is opened to listen to incoming connection. Sometimes, the connection from the remote PowerShell does not work because of the following error:

Connecting to remote server failed with the following error message : The WinRM client cannot process the request.

If the authentication scheme is different from Kerberos or if the client computer is not connected to a domain, you must use HTTPS transport. Or, add the destination machine to the TrustedHosts configuration setting.

Use the following command to configure TrustedHosts:

winrm.cmd

Note:

Computers in the TrustedHosts list might not be authenticated. For more information, run the following command:

winrm help config

You can also run the following command to set the remote host as a trusted host on the client:

winrm set winrm/config/client'@{TrustedHosts="10.0.5.35"}'

What to do next

Once you have enabled the protocol, skip to Configure a Firewall.