Do you have the Exchange management tools installed on your machine?
Set-Mailbox -Identity <mailboxID> -HiddenFromAddressListsEnabled:$true
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sorry for posting another question.
I want to hide the mailbox for one specific user in the GAL.
I know how to do this on the exchange server, but I noticed in AD there is an attribute msExchHideFromAddressLists that is set to TRUE when you hide the account.
I want to use powershell to hide the mailbox, but cannot for the live of it find out how to change this to TRUE.
I am able to retrieve the status by running Get-ADuser -Identity username -property msExchHideFromAddressLists.
When using the Set-ADuser how can I set this attribute to true?
Might be a simple question, but I am having a brainfreeze here.
Thanks again
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
Answer accepted by question author
Do you have the Exchange management tools installed on your machine?
Set-Mailbox -Identity <mailboxID> -HiddenFromAddressListsEnabled:$true
Get-ADuser -Identity username -property msExchHideFromAddressLists |
Set-ADObject -Replace @{msExchHideFromAddressLists=$true}
Advantage of Set-ADObject is that you can use this with users, group or contact.