PowerShell on MacOS

The Problem

I was recently auditing EXOL mailboxes and needed Powershell to do it in bulk. I do the majority of my sysadmin work on my mac, but on the rare occasion that I find I absolutely need windows, I run a Windows 11 VM on Parallels. In this case I thought I needed Windows for Powershell, so I started up my VM. On a related note, mine is an 8 GB RAM Macbook air so resources are light, but Apple handles RAM management so well, the performance of the VM has been very good even under a heavy load. That recently changed when Apple Intelligence rolled out and I found that the additional RAM needed for the AI models displaced enough memory so that system performance when running the VM suffered. The VM is still usable but is annoyingly slow and so it didn’t fill me with warm fuzzies at the prospect of using it.

The Solution

On a whim, I asked ChatGPT if I could do the mailbox audit on macOS and was pleasantly surprised that you can. Apparently there is a HomeBrew package for Powershell. I performed the install, added the exchangeonline module and boom. I audited the mailboxes without issue and more imprtantly without the annoying performance lag.

How To Install It

1. If not done so already install HomeBrew, the missing package manager for macOS by opening Terminal and running:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

More information on HomeBrew can be found at [The HomeBrew Home Page](https://brew.sh)

2. Install PowerShell Core. in Terminal run:

brew install --cask powershell

3. Start Powershell by typing the following in Terminal

pwsh

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *