Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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...