A while ago, I ‘eugh-ed’ over the steps required to get remote powershell working even in Windows. I think back then this would never have worked on macOS, but here we are, a little less than a year later, and I’ve for some reason got it working on macOS Big Sur.
The scenario was – as you would expect little less – somewhat convoluted. I was trying to configure Room Lists in Exchange Online which – is easy to create a Room Mailbox in Exchange Admin, but they are not usable unless you can then connect via remote powershell and enable room lists. Bit of a facepalm, obvs.
So when faced with this, I was reminded that some time ago I cleaned up my mac, which meant squirreling away my now mostly unused Windows VMs. I couldn’t bring myself to move 3ft to my right to get my storage disk, so instead set about trying to get Powershell on macOS working. It wasn’t too bad, but I did disappear down a bit of a rabbit hole when I hit an issue with OMI. I’ll spare you the drama.
So here’s what you do. This is on macOS Big Sur latest (11.2.1 at time of writing.) It does assume you have homebrew installed. It’s mostly join the dots, so if you get issues along the way, just do what you’re told. You will get warnings about untrusted galleries – you make a call on whether this is OK to you.
- brew install powershell
- brew install openssl
You may get
Warning: email@example.com 1.1.1g is already installed and up-to-date To reinstall 1.1.1g, run `brew reinstall firstname.lastname@example.org`
which is OK.
4. Install-Module -Name PowerShellGet (source)
5. Install-Module -Name ExchangeOnlineManagement
6. Install-Module -Name PSWSMan
7. sudo pwsh -Command ‘Install-PSWSMan’
8. Restart powershell
9. Import-Module ExchangeOnlineManagement
This should disappear off to your browser to prompt for authentication.
But that was it, mostly.