Last active
August 29, 2015 14:21
-
-
Save alexinnes/08fb6d322dab08bb0149 to your computer and use it in GitHub Desktop.
Hides all disabled accounts from global address list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#which exchange server | |
$server = "" | |
Get-Mailbox -Filter{(HiddenFromAddressListsEnabled -eq $false) -AND (UserAccountControl -eq "AccountDisabled, NormalAccount")} | |
| where {$_.servername -like "$server"} | set-mailbox -HiddenFromAddressListsEnabled $True | |
##Must run in exchange console## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment