I need to export some PST. Problem is, when I use my foreach-object to export every PST one by one, they are all put in queue. But an other program is supposed to work using the PST at the same time.
dir | foreach-object {
$var = $_
New-MailboxExportRequest -Mailbox $var -Filepath "\\******\******tmp\pst\$var.pst"
}
I dont want my requests to be queued, I want them to be completed before starting an other one. For example, if the first request extracts pst1
, i want it to be fully extracted before putting pst2
in queue. Is there a way to do this ?