- Microsoft Exchange 2010 PowerShell Cookbook
- Mike Pfeiffer
- 275字
- 2021-04-02 19:05:11
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 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 straight forward 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-PublicFolder
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 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
- VR新未來
- 從零開始:AutoCAD 2015中文版機械制圖基礎培訓教程
- Drupal Multimedia
- UG NX 9.0中文版 基礎教程 (UG工程師成才之路)
- Adobe創意大學InDesign CS5 版式設計師標準實訓教材
- Quickstart Apache Axis2
- 中文版3ds Max 2021完全自學教程
- 中文版Photoshop CC平面設計實用教程
- Photoshop+Illustrator商業廣告設計從入門到精通(第2版)
- 中文版Dreamweaver基礎培訓教程
- Instant Testing with QUnit
- RAW 數碼底片演義
- 零基礎學Premiere Pro短視頻制作
- Origin 2022科學繪圖與數據分析
- Altium Designer 20 中文版從入門到精通