- 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
- 基于粒計(jì)算模型的圖像處理
- INSTANT OpenCV Starter
- Oracle 11g從入門到精通(第2版) (軟件開發(fā)視頻大講堂)
- Python從小白到大牛
- Arduino開發(fā)實(shí)戰(zhàn)指南:LabVIEW卷
- Dependency Injection in .NET Core 2.0
- HTML5+CSS3+JavaScript Web開發(fā)案例教程(在線實(shí)訓(xùn)版)
- Big Data Analytics
- Python:Master the Art of Design Patterns
- C語言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo) (第2版)
- 軟件測試實(shí)用教程
- 基于SpringBoot實(shí)現(xiàn):Java分布式中間件開發(fā)入門與實(shí)戰(zhàn)
- Arduino機(jī)器人系統(tǒng)設(shè)計(jì)及開發(fā)
- Instant Automapper
- 多媒體技術(shù)及應(yīng)用