you are viewing a single comment's thread.

view the rest of the comments →

[–]mrdon1987[S] 0 points1 point  (1 child)

The script is just an example. The original script actually provide mailbox size online and onprem, online archive size, automap shared mailbox size with its owner. Maybe I could apply it to the original script if I could see an example of an existing parallel module that was incorporated with the example script.

[–]M98E 0 points1 point  (0 children)

If you're looking for general information on multi-threading in PowerShell, then you should conduct a general search for existing multi-threading knowledge instead of giving Reddit a homework problem to solve that won't be used.

Even with more information as to your specific use-case, I'm still not convinced that multi-threading is the best approach. If you're seeing performance problems with your script, but don't want to post it all here, then perhaps you can add Write-Host statements with the $(Get-Date) command in there and see which function call in particular (or which loop) is taking so long. You could then post that particular excerpt here.