Join Us!

Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.
A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Login

Enter your Project Envision username.
Enter the password that accompanies your username.
Request new password

How to Add a New E-Mail Address in Exchange 2007 using Power Shell

Power Shell is very handy when it comes to managing Exchange 2007. Adding new email addresses for existing mailbox users is very common task for exchange administrators. Unfortunately there is no one cmdlet which would allow it. Below I will present a simple script, which is a combination of Get-Mailbox and Set-Mailbox cmdlets.

[PS] C:\Windows\System32>Get-Mailbox -Identity "acte\mroot" | fl EmailAddresses 
EmailAddresses : {smtp:mroot@acte.local, SMTP:mroot@acte.pl}
[PS] C:\Windows\System32>$tmpMailbox = Get-Mailbox -Identity "acte\mroot"
[PS] C:\Windows\System32>$tmpMailbox.EmailAddresses.Add("kz@acte.pl")
[PS] C:\Windows\System32>Set-Mailbox -Instance $tmpMailbox
[PS] C:\Windows\System32>Get-Mailbox -Identity "acte\mroot" | fl EmailAddresses
EmailAddresses : {smtp:kz@acte.pl, smtp:mroot@acte.local, SMTP:mroot@acte.pl}

The first line displays currently assigned email addresses to a mailbox object, which is identified by “acte\mroot”, the “fl EmailAddresses” means that we only want to display EmailAddresses property of mailbox object.

[PS] C:\Windows\System32>$tmpMailbox = Get-Mailbox -Identity "acte\mroot"

In above lines we assign mailbox object to a variable.

[PS] C:\Windows\System32>$tmpMailbox.EmailAddresses.Add("kz@acte.pl")

Here we add new email address to EmailAddresses collection.

[PS] C:\Windows\System32>Set-Mailbox -Instance $tmpMailbox

Set-Mailbox cmdlet saves our changes

[PS] C:\Windows\System32>Get-Mailbox -Identity "acte\mroot" | fl EmailAddresses

Lastly we verify that new email address was added.

Categories: