Investigating Missing Mailbox Folders in Exchange Online with PowerShell

“My folder disappeared!” – says every third user on a Monday morning.

Whether it’s the infamous “Marketing Europe Archive 2021 (Old OLD)” folder or just the default Deleted Items, as an Exchange admin you’ve probably heard this story more times than you’d like. So how do you respond quickly without clicking through Outlook folder trees like it’s Minesweeper?

PowerShell to the rescue.

Use Case

This PowerShell tool lets you instantly search for any folder by name within a mailbox and get stats like:

  • Folder path
  • Folder type
  • Number of items
  • Total count across matches

All without needing to open Outlook or Exchange Admin Center.


Prerequisites

  • ExchangeOnlineManagement PowerShell module

Get the Script

👉 View on GitHub


Real-World Example: “The Folder Was There Yesterday!”

A user sends you the classic message:

“I had a folder called Marketing Plans, and now it’s gone!”

You run:

Boom instant answers:

Problem solved in seconds – no Outlook needed.


What the Script Does

  • Connects to Exchange Online securely
  • Searches folder paths using a partial match (e.g., *Marketing*)
  • Displays folder path, folder type and item count
  • Adds a total item summary across all matching folders
  • Closes the session automatically

Summary

When folders go poof, don’t panic – script it.

This PowerShell tool saves time, clears confusion, and makes you look like an inbox-diving wizard. You can tweak it further to export results, loop through a list of mailboxes, or check folder sizes.

Need help extending it? Let me know in the comments or reach out on author@azure365addict.com.

Leave a Comment

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

Scroll to Top