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.
Here's what I did:
pwsh -Command 'Install-Module -Name PSWSMan'
sudo pwsh -Command 'Install-WSMan'
See from Matt Thornton: Exchange Online Powershell on macOS
Tested below on MacOS 11.6
brew install powershell
brew install openssl
pwsh
Install-Module -Name PowerShellGet
Install-Module -Name PSWSMan
sudo pwsh -Command 'Install-WSMan'
This followings work on Mac without issue.
pwsh -Command 'Install-Module -Name PSWSMan'
sudo pwsh -Command 'Install-WSMan'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With