[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2009-07-16
1
Medium Priority
?
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 30

Accepted Solution

by:
Britt Thompson earned 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

649 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