What It Does
The script is read-only. It reports the Office version, update channel and Outlook.exe build, from the Click-to-Run configuration or the installed file for an MSI install, then the signed-in user's Outlook profiles, the default profile and how many accounts each holds.
It lists OST and PST files with their sizes. An OST over OstWarningGB, 50 GB by default, is flagged because Outlook slows and can corrupt, and a PST or OST on a network path is flagged because Microsoft does not support it. It checks the Cached Mode policy value and whether an OST exists, and it lists COM add-ins with their LoadBehavior, including the ones Outlook disabled itself.
It lists Outlook crashes (Application Error, event 1000) and hangs (Application Hang, event 1002) in the last CrashDays days, newest first, up to 10. The user's registry and folders are read in the signed-in user's session, and the Office install and event log are read as SYSTEM. With nobody signed in, the user part is left out with a warning.
It covers classic Outlook (OUTLOOK.EXE). The new Outlook for Windows is not covered, and Outlook not installed ends SKIPPED. The Flagged column marks what to look at first.
Before You Run It
- Run it while the user is signed in, or the profile, file and add-in sections are left out.
- Know it covers classic Outlook only. The new Outlook for Windows is not covered.
- Set OstWarningGB and CrashDays to suit the mailbox sizes and how far back you want to look.
- Use ExportPath to save the rows as a CSV to attach to the ticket.
Type and Risk
- Type: Report. It collects facts into a table and never alerts. It exits 0, or 2 when it could not run.
- Risk: Low. It reads and changes nothing.
- Restart: It never restarts the machine.
- Typical run: Under 1 minute.
- Example answer: "Outlook 16.0.17328.20162 (Current Channel); 1 profile(s); OST 3.2 GB; 1 add-in disabled; 2 crashes in 14 days"
- Tested before listing on Windows 11 with Windows PowerShell 5.1, run as SYSTEM, against its own test cases.
Inputs
Pass an input as an argument (-Name value), as an environment variable with the same name, which is how most RMMs pass script variables, or change its default in the param() block at the top of the script. An argument wins over an environment variable, which wins over the default.
- OstWarningGB: Flag an OST or NST file larger than this many GB. Whole number, 1 to 10000. Default 50.
- CrashDays: Look back this many days for Outlook crashes and hangs. Whole number, 1 to 365. Default 14.
Every script also takes DryRun, OutputFormat (Text, Answer, Json or Csv), ExportPath and ResultField, which writes the answer to an RMM custom field.
License
Provided "as is" under the MIT License, without warranty of any kind. Test before production use. MSP Outpost and User First Digital Inc. accept no liability for any damage or loss.