You can use an IP address to represent a remote computer in a Windows PowerShell command. However, when you use an IP address, Windows PowerShell uses NTLM protocol authentication, instead of Kerberos. As such, you must add the IP address to the TrustedHosts list on the computer before using the IP address in a remote command.

If you use an IP address and the computer is not configured correctly, Windows PowerShell generates the following error message.

  Copy Code
ERROR:  The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting.

The ComputerName parameters of the New-PSSession, Enter-PSSession, and Invoke-Command cmdlets accept an IP address as a valid value. However, because Kerberos authentication does not support IP addresses, by default, NTLM authentication is used whenever you specify an IP address. When using NTLM authentication, the following procedure is required for remoting.

To use IP addresses and NTLM authentication for Windows PowerShell remoting

  1. Configure the computer for HTTPS transport or add the IP addresses of the remote computers to the TrustedHosts list on the local computer. For more information, see How to Add a Computer to the TrustedHosts List.

  2. Use the Credential parameter in all remote commands. This is required even when you are submitting the credentials of the current user.