Exchange Mailbox Features: Enabling or Disabling by OU

When you need to enable or disable specific mailbox features — OWA, ActiveSync, IMAP, POP — for a whole department or site, doing it mailbox-by-mailbox in the EAC is slow. Exchange PowerShell lets you target every mailbox in a given Organizational Unit in one pass. Example — Disable IMAP and POP for an OU Get-User […]

Exchange Disable Enable Mailbox Features Based On Organisation Unit

When you need to enable or disable specific mailbox features — OWA, ActiveSync, IMAP, POP — for a whole department or site, doing it mailbox-by-mailbox in the EAC is slow. Exchange PowerShell lets you target every mailbox in a given Organizational Unit in one pass.

Example — Disable IMAP and POP for an OU

Get-User -OrganizationalUnit "contoso.com/Sales" -ResultSize Unlimited | Get-Mailbox | Set-CASMailbox -ImapEnabled $false -PopEnabled $false

Example — Re-enable OWA for the Same OU

Get-User -OrganizationalUnit "contoso.com/Sales" -ResultSize Unlimited | Get-Mailbox | Set-CASMailbox -OWAEnabled $true

Get-User -OrganizationalUnit scopes the pipeline to accounts in that specific OU (not sub-OUs unless you target the parent and the child accounts happen to live directly under it), Get-Mailbox filters that down to only the objects that actually have a mailbox, and Set-CASMailbox applies the client access settings. Swap in -ActiveSyncEnabled $false or any of the other Set-CASMailbox switches as needed for your specific feature.

Always test the Get-User -OrganizationalUnit ... | Get-Mailbox portion on its own first (without piping into Set-CASMailbox) to confirm it returns exactly the mailboxes you expect before making the change.

Resources

🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.