Solved

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

Posted on 2009-07-16
1
290 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

832 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