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

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
主站蜘蛛池模板: 四子王旗| 金平| 霍林郭勒市| 大渡口区| 日土县| 马边| 余庆县| 福泉市| 屏山县| 石家庄市| 安平县| 惠来县| 石景山区| 临颍县| 大丰市| 安化县| 桂林市| 石楼县| 平湖市| 新蔡县| 西林县| 巫溪县| 聂荣县| 买车| 大埔县| 遵义市| 班玛县| 浪卡子县| 玉门市| 九龙城区| 太和县| 宿松县| 淳安县| 阿巴嘎旗| 常熟市| 阳高县| 河东区| 金秀| 永寿县| 苏州市| 南投县|