E14–Bulk Create Mail Contact & Set-Contact

 

http://community.office365.com/en-us/w/exchange/579.aspx 

 

Get-Contact | Export-Csv c:\temp\contact.csv

Get-MailContact | Export-Csv c:\temp\Mailcontact.csv

 

[PS] Import-Csv .\Contact_Source.csv | % {New-MailContact -Name $_.Name -DisplayName $_.DisplayName -ExternalEmailAddress $_.ExternalEmailAddress -Alias $_.Alias -PrimarySmtpAddress $_.PrimarySMTPAddress -OrganizationalUnit "Contacts" -WhatIf }

 

image

[PS] >$Contacts = Import-Csv .\Contact_final.csv

[PS] >$Contacts | foreach {Set-Contact $_.Name -Company $_.Company -Department $_.Department -Office $_.Office -Phone $_.Phone }

Comments

Popular posts from this blog

E15 CU3–Update Failed–AD replicated Exceeded the tombstone lifetime.

202301 - Exchange onpreme - PowerShell Serialization Payload Signing