Thursday, July 16, 2015

Add information to properties of external contacts

After you run the command in step 2, the external contacts are created, but they don’t contain any of the contact or organization information, which is the information from the most of the cells in the CSV file).
Run the following commands to add the other properties from the CSV file to the external contacts you created:
$Contacts = Import-CSV .\externalcontacts.csv
$contacts | ForEach {Set-Contact $_.Name -StreetAddress $_.StreetAddress -City $_.City -StateorProvince $_.StateorProvince -PostalCode $_.PostalCode -Phone $_.Phone -MobilePhone $_.MobilePhone -Pager $_.Pager -HomePhone $_.HomePhone -Company $_.Company -Title $_.Title -OtherTelephone $_.OtherTelephone -Department $_.Department -Fax $_.Fax -Initials $_.Initials -Notes $_.Notes -Office $_.Office -Manager $_.Manager}
Don’t worry if you don’t have all the information populated in the CSV file. If it’s not there, it won’t be added.
Note: The Manager parameter can be problematic. If the cell is blank in the CSV file, you will get an error and none of the property information will be added to the contact. If you don’t need to specify a manager, then just delete –Manager $_.Manager from the previous PowerShell command.

That’s it. You can view the contact properties in the Exchange Control Panel. Users can see the contacts in the address book Outlook and Outlook Web App.

No comments:

Post a Comment