Bulk email ID creation in Exchange 2007 through Shell
Hi, Using the below script for creating bulk email address from 'csv' file. Import-CSV "C:\CreateRecipients.csv" | foreach { new-mailbox -alias $_.alias -name $_.name -firstname $_.firstname -lastname $_.lastname -displayname $_.displayname -userPrincipalName $_.upn -database $_.database -org $_.org -Password $Password -ResetPasswordOnNextLogon $false | set-user -Company $_.company -Department $_.department -Office $_.office} CSV file has columns like alias,name,firstname,lastname,displayname,upn,database,org,company,department and office. I need the following to be included. 1. Need to stop Email address policy and assign "Primary SMTP Address" via script. 2. Add "Description" attribute for the user. Can anyone help me on this? Senthil KR
February 9th, 2010 2:16pm

Hi,First, I am not a power shell expert. If you want to get further support about power shell, suggest you ask a quesiton in windows power shell forum.http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/threadsAs I know, when you create a mailbox use the cmdlet New-Mailbox, you cannot use a parameter, like EmailAddressPolicyEnabled to create it. But after creating the mailbox, you can use Set-Mailbox with the EmailAddressPolicyEnabled to disable the Auto update from Email address policy and with PrimarySmtpAddress to manually assign aN address to the newly user. Set-Mailbox<!----> http://technet.microsoft.com/en-us/library/bb123981(EXCHG.80).aspxFor "Description" attribute, neither Set-mailbox nor Set-user has a parameter about it, so it maybe not updated to Exchange schema, maybe you can use AD tool to goal. http://social.technet.microsoft.com/Forums/en-US/winserverDS/threadsFrank Wang
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2010 9:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics