Question : Change primary smtp addresses for 29 users using powershell for exchange

Hello,

We've just bought a new domain name and I've been asked to change 29 users Primary SMTP addresses from @DomainA to @DomainB . I would like to keep their DoaminA as a secondary email address.
How can I do this using powershell?

Tacobell2000

Answer : Change primary smtp addresses for 29 users using powershell for exchange

put the users in CSV file and save it as CreateRecipients.csv in C partition format it as follow

id,newaddressstring
user1,[email protected]
.....

Import-CSV c:\CreateRecipients.csv | foreach {set-mailbox -identity $_.id -PrimarySmtpAddress $_.newaddressstring -EmailAddressPolicyEnabled $false}

Random Solutions  
 
programming4us programming4us