官术网_书友最值得收藏!

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
主站蜘蛛池模板: 高州市| 苏州市| 四子王旗| 宾川县| 桐梓县| 贵阳市| 罗山县| 朝阳县| 织金县| 济南市| 司法| 阆中市| 利辛县| 杂多县| 兰溪市| 措勤县| 崇义县| 沁水县| 河北省| 湖口县| 江安县| 秦皇岛市| 封丘县| 南康市| 正阳县| 日土县| 承德市| 资溪县| 黔西县| 大竹县| 罗平县| 思茅市| 岗巴县| 雅江县| 白银市| 黔西| 崇文区| 平泉县| 永泰县| 宿迁市| 土默特右旗|