Error "no supported WSMan client library was found." with macOS pwsh

Jean-Pierre Matsumoto picture Jean-Pierre Matsumoto · Jan 20, 2021 · Viewed 20.8k times · Source

From macOS Terminal, when I execute:

pwsh -command "Enter-PSSession myhost"

I get error from PowerShell:

Enter-PSSession: This parameter set requires WSMan, and no supported WSMan client
library was found. WSMan is either not installed or unavailable for this system.

I've spent 2 hours to find a solution. I am going to answer my own question.

Answer

0x3333 picture 0x3333 · Jun 1, 2021

Here's what I did:

pwsh -Command 'Install-Module -Name PSWSMan'
sudo pwsh -Command 'Install-WSMan'