Solved

exchange 2007 - shell One comand for multiple aliases with multiple domains

Posted on 2009-07-16
1
279 Views
Last Modified: 2012-05-07
exchange 2007 - shell One command for adding an alias to a mailbox with multiple domains

mailbox: john.doe
domains:aaa.com, vvv.com, qqq.com, fff.com
alias: john

is there a shell one command to add the alias to all the domains that john.doe's mailbox  has??
0
Comment
Question by:whocaresaboutit
1 Comment
 
LVL 30

Accepted Solution

by:
renazonse earned 500 total points
ID: 24871331
It'd be something like this:

@http://powershellcommunity.org/Forums/tabid/54/aff/3/aft/910/afv/topic/Default.aspx

$mailboxes = Get-Mailbox
foreach ($mailbox in $mailboxes)
{
$newaddress = $mailbox.samAccountname + "@secondaddress.contoso.com"
$mailbox.EmailAddresses += $newaddress
Set-Mailbox -Identity $mailbox.alias -EmailAddresses $mailbox.EmailAddresses
}

Or in combination with this:

@http://technet.microsoft.com/en-us/library/bb123794.aspx

$Temp = Get-Mailbox -Identity
$Temp.EmailAddresses.Add("smtp:john@secondaddress.contoso.com")
$Temp.EmailAddresses += ("smtp:john@thirdaddress.contoso.com")
Set-Mailbox -Instance $Temp
0

Featured Post

Can’t get the mobile email signature right?

Not having any luck when trying to create an email signature for mobile devices? Does the formatting keep messing up? Make sure you have great email signatures on all devices by using Exclaimer Cloud - Signatures for Office 365.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now