Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Power shell script to Add primary SMTP address to multiple mailbox in Exchange 2010

$
0
0
I have to add new SMTP address to bulk disabled user mailbox. I have tried the below command and it is working for single user. Remote Pipeline Execution Failed For bulk users.

 Get-Content c:\users.txt | get-mailbox | select-object $_.samaccountname | foreach {Set-Mailbox $_.identity -emailAddressPolicyEnabled:$false -primarySmtpAddress ("{0}.terminated@domain.com" -f $_.samaccountname)}

Error while executing for multiple user:


Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently.
    + CategoryInfo          : OperationStopped: (Microsoft.Power...tHelperRunspace:ExecutionCmdletHelperRunspace) [],
   PSInvalidOperationException
    + FullyQualifiedErrorId : RemotePipelineExecutionFailed

My objective is to replace primary SMTP address with new one in format UserID.terminated@domain.com

Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>