Use PowerShell to Set-Contact in Exchange 2010
Set-Contact is a nifty PowerShell cmdlet for modifying an existing Exchange contact object. If you are changing multiple contacts then you could employ a second PowerShell cmdlet such as Get-Contact; the technique is to pipe its output into Set-Contact.
Remember that the 'Set' verb makes changes, thus if you it's your first time, I recommend you check with the corresponding Get-Contact first. Another technique is to wade straight in with Set-Contact, but append the -WhatIf parameter until you are sure that the modifications are what you expected.
The only requirement with the Set-Contact cmdlet is that you supply the -Identity of the object.
Set-Contact -Identity "Guido" -MobilePhone 077 821 756
Note 1a: MobilePhone is only one of the many properties that you can amend, let us research more of Set-Contact's parameters.
Note 1b: Other interesting parameters of the 'Phone' family, include Pager and HomePhone.
One of the best features of PowerShell is piping. In this instance obtain a flow of 'Leads' using another cmdlet, and stream them into Set-Contact so that you can adjust their 'Department" value.
Get-User -OrganizationalUnit "Contacts" | Set-Contact -Department "Sales"
Note 2a: An alternative source cmdlet is Get-Mailbox, the piping techique would be the same as in the above script.
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.
Compare PowerShell with the EMC
It's also possible to create new contacts.
# Create a Contact with PowerShell
If you created a Mail Contact manually, then Get-mailcontact should display the name, both objects.
Note 1: In PowerShell nouns are singular.
In order to disable a mailcontact you need its Alias or DN. For example
Note disable is different from delete. If you wished to delete a mailcontact then the command is:
Remove-Mailcontact Martha Jones
Here is a free tool to monitor your Exchange Server. Download and install the utility, then inspect your mail queues, monitor the Exchange server's memory, confirm there is enough disk space, and check the CPU utilization.
This is the real deal - there is no catch. SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.
Summary of Create Contacts with PowerShell
Set-Contact is a nifty PowerShell cmdlet for changing a property on existing Exchange contact object, for example, MobilePhone, City or Company.
If you like this page then please share it with your friends
See more PowerShell Cmdlets for Exchange 2010: