Howdy -
I'm running into a wall with invoke-command, and I could use a hand. Here's my setup:
Win 10, PS v.5.1
Firewall is completely off for all profiles
Execution Policy: unrestricted
PSRemoting enabled
WinRM: Running
I'm just trying to get invoke-command to work at the moment with this simple command:
Invoke-Command -ComputerName localhost -ScriptBlock {get-service}
But I get this error back:
[localhost] Connecting to remote server localhost failed with the following error message : The client cannot connect
to the destination specified in the request. Verify that the service on the destination is running and is accepting
requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly
IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and
configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help
topic.
+ CategoryInfo : OpenError: (localhost:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : CannotConnect,PSSessionStateBroken
I'm not sure what else I need to do to get Invoke-Command to do it's thing.
For what it's worth, I've also tried this on a Win7 system with the same results.
Thoughts?