1

I have 100 databases in Exchange that I want to perform a task on. I might want to change the currently mounted server or something else.

When I run this command, each database is serially synced. I would like to run them all in parallel. How can I accomplish this?

Get-MailboxDatabaseCopyStatus -Server nyc01| where Status -eq Failed | Suspend-MailboxDatabaseCopy
Get-MailboxDatabaseCopyStatus -Server nyc01 | where Status -eq FailedAndSuspended | Update-MailboxDatabaseCopy- SourceServer nyc02 -DeleteExistingFiles:$true -Confirm:$false
makerofthings7
  • 8,911
  • 34
  • 121
  • 197

1 Answers1

1

IMO No need for workflow for that scenario, You can run the commands as a job and it will run in parallel, to receive the job use the cmdlet receive-job.

The Cmdlets Get-MailboxDatabaseCopyStatus, Suspend-MailboxDatabaseCopy and Update-MailboxDatabaseCopy already has a bulit-in -AsJob Parameter, just add it and it will run as job in the background in parallel.

Get-MailboxDatabaseCopyStatus -Server nyc01| where Status -eq Failed | Suspend-MailboxDatabaseCopy -AsJob
Get-MailboxDatabaseCopyStatus -Server nyc01 | where Status -eq FailedAndSuspended | Update-MailboxDatabaseCopy -SourceServer nyc02 -DeleteExistingFiles:$true -Confirm:$false -AsJob
Avshalom
  • 161
  • 7