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 }
[PS] >$Contacts = Import-Csv .\Contact_final.csv
[PS] >$Contacts | foreach {Set-Contact $_.Name -Company $_.Company -Department $_.Department -Office $_.Office -Phone $_.Phone }
Comments
Post a Comment