Adding proxyAddresses with Powershell
Hi, I need a script which will add Primary and Secondary proxy Address. Thnaks
July 4th, 2012 11:46am

Why not use Email Address Policy ? (I assume now that your're not on EX03) Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 11:50am

actually this is the requirement . i am using Exchange 2010
July 4th, 2012 11:52am

See this article: http://technet.microsoft.com/en-us/library/bb684908 Multivalue property syntax Action Syntax Add one or more values to a multivalued property @{Add="<value1>", "<value2>", "<value3>"} Remove one or more values from a multivalued property @{Remove="<value1>", "<value2>", "<value3>"} Mike Crowley | MVP My Blog -- Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 2:27pm

Just go through the below info, http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/10822d3d-fe16-4bcd-91f2-c757a800a6fc
July 4th, 2012 10:35pm

hi, First you should create a csv file like this: Alias Primaryaddress secondaryaddress Tom @test.com @test1.com tony @just.com @just2.com Then run the cmd in the EMS: Import-Csv Your csv file name | Foreach-Object { $user = Get-Mailbox -Identity $_.Alias $user.EmailAddresses+="$_.Alias$_.Primaryaddress" $user.EmailAddresses+="$_.Alias$_.Secondayaddress" Set-Mailbox $user -EmailAddresses $user.EmailAddresses -EmailAddressPolicyEnabled $false set-mailbox $user -PrimarySMTpAddress "$_.Alias$_.Primaryaddress" -EmailAddressPolicyEnabled $false } hope can help you thanks, CastinLu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 3:34am

Castinlu, there are several things wrong with your codeblock. Besides this, it is overkill. As I already stated above, you can add email address policies without a complicated foreach block. e.g. Set-Mailbox tony -EmailAddresses @{Add="tony1@domain.com"} Set-Mailbox tony -EmailAddresses @{Add="tony2@domain.com"} and to set one as primary: Set-Mailbox tony -EmailAddressPolicyEnabled $false -PrimarySmtpAddress tony3@domain.com Mike Crowley | MVP My Blog -- Planet Technologies
July 5th, 2012 1:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics