O'Reilly logo

Microsoft Exchange Server PowerShell Cookbook - Third Edition by Mike Pfeiffer, Jonas Andersson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with contacts

Once you've started managing mailboxes using the Exchange Management Shell, you'll probably notice that the concepts and command syntax used to manage contacts are very similar. The difference, of course, is that we need to use a different set of cmdlets. In addition, we also have two types of contacts to deal with in Exchange. We'll take a look at how you can manage both of them in this recipe.

How to do it...

Let's see how to work with contacts using the following steps:

  1. To create a mail-enabled contact, use the New-MailContact cmdlet:
    New-MailContact -Alias rjones `
    -Name "Rob Jones" `
    -ExternalEmailAddress rob@fabrikam.com `
    -OrganizationalUnit sales
    
  2. Mail-enabled users can be created with the New-MailUser cmdlet:
    New-MailUser ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required