Share via

Set AD attribute msExchHideFromAddressLists to TRUE

Ingrid 61 Reputation points
2022-07-07T11:51:33.903+00:00

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

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Rich Matheisen 48,116 Reputation points
2022-07-07T14:46:48.29+00:00

Do you have the Exchange management tools installed on your machine?

Set-Mailbox -Identity <mailboxID> -HiddenFromAddressListsEnabled:$true  

Was this answer helpful?

2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Newbie Jones 1,411 Reputation points
    2022-07-07T14:12:29.873+00:00
        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.

    Was this answer helpful?

    3 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.