Link to home
Start Free TrialLog in
Avatar of snooflehammer
snooflehammerFlag for Australia

asked on

Run multiple commands sequentially in the Exchange Management Shell

Need to export a bunch of mailboxes to PST files. I know the command for the Management Shell:

New-MailboxExportRequest -Mailbox "JohnSmith" -FilePath \\SERVERNAME\FOLDERNAME\JohnSmith.pst

How do I run 50 of these one after the other?

I assume I put all the command lines in a text file then somehow apply it so they all queue u.
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

I have seen background workers and threads for Powershell, will see if I am get a good example

Here is an application I wrote to do generic threading with any exe (including Powershell)
https://www.experts-exchange.com/articles/30139/How-to-thread-single-threaded-applications.html
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.