All Articles

Connect to Exchange Online PowerShell From MacOS - For Good

If you are here, you’re probably getting this pesky error:

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

And googl’ng this problem tells you to install old version of openssl. Which didn’t work for me.

So here we are. Just use docker.

docker run  \
  -v $HOME:$HOME \
  -v $HOME/.local/share/powershell/:/root/.local/share/powershell/  \
  -v $HOME/.cache/powershell/:/root/.cache/powershell/  \
  -it pwsh

And optionally alias:

alias pwsh="docker run -v $HOME:$HOME -v $HOME/.local/share/powershell/:/root/.local/share/powershell/ -v $HOME/.cache/powershell/:/root/.cache/powershell/ -it pwsh"