Registering Powershell Sessions
Invoke-Command was giving me a strange error.
When trying to use Invoke-Command against some workstations, I was getting this error message:
Connecting to remote server X.X.X.X failed with the following error message : The WS-Management service cannot process the request. Cannot find the Microsoft.PowerShell session configuration in the WSMan: drive on the X.X.X.X computer.
This blog post helped me fix it.
Basically, the Powershell endpoint was not registered. Get-PSSessionConfiguration | select name showed that my workstations only had microsoft.powershell.workflow registered.
Running Register-PSSessionConfiguration -Name Microsoft.powershell fixed the issue and allowed my Invoke-Command to work.
I’m not sure what exactly causes this. The workstations should all be running WMP5.1 but these are in-place upgrades from Windows 7 to Windows 10. Perhaps that had something to do with it.