# Create Exchange mail contact via command-line New-Mailcontact -Name Billy Cato` -ExternalEmailAddress:
email@example.com` -OrganizationalUnit Boston` -Alias BillyCato
Once we have created the Mail Contact here are more PowerShell
commands to configure the Contact:
Get-Mailcontact (Only contacts
that are enabled) Get-Contact (All contacts including those disabled)
If you created a Mail Contact manually, then Get-mailcontact should display the name, both objects. Get-mailcontact
| Format-Table name, alias, ExternalEmailAddress -autosize.
1: In PowerShell nouns are singular.
Once you have created
an Exchange 2010 contact via command line, you need to enable it. For
this you need values not only for -Identity, but also for ExternalEmailAddress. The value
for the ExternalEmailAddress can be any of these:
Guy Recommends: SolarWinds' Free Bulk Mailbox Import Tool
Import users from a spreadsheet, complete with their mailbox. Just provide a list of the
users with the fields in the
top row, and save as .csv file. Then launch this FREE utility, match
your Exchange fields with AD's
attributes, click and import the users. Optionally, you can
provide the name of the OU where the new mailboxes will be born.
There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:
Bulk-import new users and mailboxes into Active Directory.
The purpose of this simple illustration is to list all the roles of an
Exchange Server. Observe the simplicity of PowerShell's two-part
instruction, the verb 'Get' coupled to the noun 'ExchangeServer'.
Guy Recommends: A Free Trial of the Network Performance Monitor
Network Performance Monitor
will help you discover what's happening on your network. This
utility will also guide you through troubleshooting; the dashboard will
indicate whether the root cause is a broken link, faulty equipment or
What I like best is the way NPM suggests solutions to network
also has the ability to monitor the health of individual VMware
virtual machines. If you are interested in troubleshooting, and creating
network maps, then I recommend that you try NPM now.
As usual, always try the 'Get' verb, but if you know what you are doing
then experiment with: Mount,
Dismount, Clean or even Remove.
Mailbox Policy Cmdlets
You can also use PowerShell cmdlets to modify the various email policies, the key
nouns are: InboxRule and EmailAddressPolicy.
Recommends: Free WMI Monitor for PowerShell
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft's operating systems. Fortunately, SolarWinds
have created a
Free WMI Monitor so that you can discover these gems of performance
information, and thus improve your PowerShell scripts.
Take the guess work out of which WMI counters to use when scripting the
operating system, Active Directory, or Exchange Server. Give this WMI monitor a
try - it's free.
Summary of Create Contacts with PowerShell's New-Mailcontact
It's easy to use PowerShell's New-Mailcontact to create an Exchange 2010
mail contact from the command
line. I chose creating contacts as a vehicle for PowerShell
because contacts are easier to manipulate than other Active Directory objects.
If you like this page then please share it with your friends