teomcam
asked on
Adding bulk emails addresses in 2008 R2 Active Directory
One of my OU contains around 1000 users who don't have exchnage email accounts. Due to lack of hardware and bandwith we are using exchnage for only 1 OU's users which they are Staff.
We have another domain name and created email accounts on Google Mail.
My question is how can I add the new external emails into the users email field.
Note: I don't wanna use Google AD Sync
Please find the sample csv file that we have for all new users.
users.csv
We have another domain name and created email accounts on Google Mail.
My question is how can I add the new external emails into the users email field.
Note: I don't wanna use Google AD Sync
Please find the sample csv file that we have for all new users.
users.csv
Alternate command
Import-CSV "users.csv" | ForEach {Set-Mailbox $_.samaccountname -EmailAddresses @{add=$_.Emailaddress}}
Ref: http://technet.microsoft.com/en-us/library/bb123794.aspx
Import-CSV "users.csv" | ForEach {Set-Mailbox $_.samaccountname -EmailAddresses @{add=$_.Emailaddress}}
Ref: http://technet.microsoft.com/en-us/library/bb123794.aspx
Are you trying to mail enable the users? or just want to add the email address in general tab of account? Also which version of exchange are you using?
ASKER
I Just wanna add the email address in General Tab of the account. I am using Exchange 2010 SP2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will try it asap and will get back to you.
Thanks
Thanks
Have you tried the one I gave you?
ASKER
No I don't think yours is a suitbale solution to my scenario. I just wanna add emails into the general tab of the people who don't have email address from our exchange server. I cannot accomodate any mailbox for that much users in the exchnage server.
Change the heading of second column to EmailAddress
foreach($user in import-csv users.csv){
$Emailaddresses = (Get-Mailbox -Identity $user.Samaaccountname).ema
$ExtAddr = "smtp:"+$User.EmailAddress
$Emailaddresses.Add($ExtAd
Set-Mailbox -Identity $user.Samaccountname -Emailaddresses $Emailaddresses
}
Note: Test this with a test mailbox first before proceeding with actual user mailboxes