Asif Gohar's Blog
Cloud Infrastructure
Thursday, April 25, 2013
Hide all AD disabled user's of an OU from exchange
$UsersToDisable = @(Get-Mailbox -OrganizationalUnit "OU=Disabled,DC=contoso,DC=com")
ForEach ($User in $UsersToDisable){
Set-Mailbox -HiddenFromAddressListsEnabled $True -Identity $User.samaccountname
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment