troubleshooting Question

Using set commands in exchange

Avatar of Kamalasekar Parthasarathy
Kamalasekar ParthasarathyFlag for India asked on
ExchangeEmail ServersPowershell
28 Comments2 Solutions1995 ViewsLast Modified:
Dear Team,

I need to use the set command for multiple queries with the same script. For example, please find the below the below script and which will run one set command for all the mailbox and  i saved as ps1 and have csv file as well.


Import-Csv C:\Users\User.csv | % {
 New-Mailbox -identity $_.Name -Alias $_.Alias  -Database DB1 -Organizationalunit "users" -Room | Set-Mailbox -CustomAttribute4 $_.CA4 -CustomAttribute5 $_.CA5 -customAttribute6 $_.CA6


Also, i need to involve another set command, for example set-Calendarprocessing for the mailboxes in the above script.
1) how to add multiple set commands with one script.
2) how can i refer the multiple csv files for each set commands.

Please suggest.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 28 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 28 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros