- Microsoft Exchange Server PowerShell Cookbook(Third Edition)
- Jonas Andersson Mike Pfeiffer
- 277字
- 2021-07-16 13:26:39
Hiding recipients from address lists
There may be times when you'll need to hide a particular mailbox, contact, or distribution group from your Exchange address lists. This is a common task that is required to be done when you have mailboxes, contacts, or public folders used by applications or staff in your IT department that should not be seen by end users. In this recipe, we'll take a look at how you can disable these recipient types from the address lists using the Exchange Management Shell.
How to do it...
To hide a mailbox from the Exchange address lists, use the Set-Mailbox
command:
Set-Mailbox dave –HiddenFromAddressListsEnabled $true
How it works...
As you can see, hiding a mailbox from address lists is pretty straightforward, as it requires only a simple PowerShell one-liner. The –HiddenFromAddressListsEnabled
parameter accepts a Boolean value, either $true
or $false
. To enable this setting, set the value to $true
, and to disable it, set the value to $false
.
There are multiple recipient types that can be hidden from address lists. Each of the following cmdlets supports the -HiddenFromAddressListsEnabled
parameter:
Set-DistributionGroup
Set-DynamicDistributionGroup
Set-Mailbox
Set-MailContact
Set-MailPublicFolder
Set-MailUser
Set-RemoteMailbox
There's more...
Once you've hidden your recipients from the address lists, you may need to generate a report to list the objects that currently have the HiddenFromAddressListsEnabled
setting enabled. Use the following command syntax to obtain this information:
Get-Mailbox -Filter {HiddenFromAddressListsEnabled -eq $true}
This searches for all the mailboxes that have been hidden from address lists. It makes use of the –Filter
parameter, which keeps you from having to perform the filtering on the client side with the Where-Object
cmdlet.
See also
- Working with recipient filters
- 新一代通用視頻編碼H.266/VVC:原理、標準與實現
- HTML5 移動Web開發從入門到精通(微課精編版)
- Ext JS Data-driven Application Design
- MongoDB for Java Developers
- Django Design Patterns and Best Practices
- TypeScript圖形渲染實戰:基于WebGL的3D架構與實現
- The Data Visualization Workshop
- Python漫游數學王國:高等數學、線性代數、數理統計及運籌學
- Integrating Facebook iOS SDK with Your Application
- SQL基礎教程(第2版)
- 區塊鏈底層設計Java實戰
- 利用Python進行數據分析
- Learning Continuous Integration with TeamCity
- 深入分析GCC
- 流暢的Python