I thought this update warranted a new post, instead of updating the previous one.
If you follow the instructions in my older post, this should get you a working PowerShell environment that will connect to Exchange Online using the ExO V2 cmdlets from Microsoft, with a huge thanks to Jordan Borean and his PSWSman / OMI implementation.
Following the instructions above will work on an Intel Mac or on an Apple Silicon Mac, however the Apple Silicon Mac will be running the entire toolchain under Rosetta translation.
Now, technically, there’s nothing wrong with this as you’re unlikely to be doing any kind of heavy lifting that would be slowed down by translating code from a different architecture, however it’s always nice to know that your shiny new Apple Silicon Mac is running native arm64 code whenever it can.
Here’s how to achieve your goal:
Go to the Releases page for PowerShell, and you’ll notice that since v7.2.0 there is now an osx-arm64 build. Download and install it.
Next, install MacPorts
If you prefer to use HomeBrew, this will also work – and save you an additional step later on in the process. I’ve been using MacPorts since forever, so I’m not going to change. Yeah, keep off my lawn while you’re at it.
Once they’re both installed, make sure that OpenSSL is installed. I think Brew might install OpenSSL by default, and MacPorts does, but it never hurts to just make 100% sure.
sudo port install openssl
Note that now you no longer need to install the Universal build, this will work with the Apple Silicon build.
After making sure OpenSSL is installed, if you’re using MacPorts you will also need to make sure that the Curl CA bundle is installed. For some reason, this isn’t installed by default and it’s needed by OpenSSL to verify the SSL certificate when connecting to Exchange Online.
sudo port install curl-ca-bundle
From here on, the instructions are the same as previously…
Launch PowerShell as root via
Once you’re in PowerShell, run the following commands:
Install-Module -Name PSWSMan Install-WSMan Install-Module -Name ExchangeOnlineManagement exit
Technically, only the Install-WSMan command needs to be run as root, so if you’re feeling paranoid you can adjust these instructions to suit.
Once this has completed, you can launch PowerShell once more and connect to Exchange Online via
This connection method will then launch your preferred browser to authenticate, including handling any MFA prompts, and then pass an authentication token back to the PowerShell session.