PowerShell: Disable all Outlook add-ins except for a specific list.

I’m currently troubleshooting some Outlook add-in issues, and I needed to disable all Outlook add-ins except for a select few that I needed to stay enabled. Here’s a cut-down version of how I achieved it.

This sample doesn’t contain any error handling or logging code, so please test thoroughly, and remove the –WhatIf switch from line 22 only when you’ve tested it thoroughly.

This script needs to be run as an admin – for example as a computer login script.