Procedure

  1. If you want to use HTTP protocol for PowerShell remoting, run the following command on the client machine to allow connections to all hosts:
    winrm set winrm/config/client @{TrustedHosts="*"}
  2. Test it on the PowerShell console by running the following commands:

    Invoke-Command	-ComputerName XENAPP-DC -Port 5986 -Credential (Get-Credential) ` 

    -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck) `

    -ScriptBlock { Write-Host "Hello from $($env:ComputerName)" }

Results

Testing of the connection is successful if you see the greeting from remote machine.