How du I import multiple values using the importcsv command?
Hi,
I need some help regarding import of multiple e-mail addresses using a csv file and powershell.
I know that using something like set-mailbox -emailaddresses address1,address2
But how do I do this using a csv file where everything is seperated using a "," ?
Thanks
Henrik
October 4th, 2007 11:00pm
Try this:
Your CSV here:
Alias,Name,UPNUser_One,User One,userone@yourUPNsuffix.comUser_Two,User Two,usertwo@yourUPNsuffix.comUser_Three,User Three,userthree@yourUPNsuffix.com
Import Script:
$Password=Read-Host "Enter Password" -AsSecureString
Import-CSV CreateRecipients.csv | foreach {new-mailbox -alias $_.alias -name $_.name -userPrincipalName $_.UPN -database "Mailbox Database" -org Users -Password $Password}
For more information look here:
http://exchangepedia.com/blog/2006/11/exchange-server-2007-bulk-creation-of.html
Deli
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2007 1:57pm
Hi and thanks!
But how do I add multiple e-mailaddresses on the accountsusing import-csv?
HenrikR
October 7th, 2007 11:32am
hello Henrikr,
I wrote about this in this article, check this out: http://www.msexchange.org/tutorials/Managing-mailboxes-Exchange-Server-2007-Part1.html
Free Windows Admin Tool Kit Click here and download it now
October 7th, 2007 10:04pm