MultiThreading / Parallel Programming

Hi All,

I am very new to PowerShell scripting. just finished watching
https://channel9.msdn.com//Series/advpowershell3/01/.

I am wondering if we can write a script to start multiple server using “mstsc” and invoke multiple exchange shell and perform the task in it and return the results to script.

If yes, can you please suggest me how to proceed? or may I get some sample code to play with it.

As for…

I am wondering if we can write a script to start multiple server using "mstsc" and invoke multiple exchange shell and perform the task in

Why use mstsc at all, when you can just use PoSH background jobs for your parallel efforts?

Don’t just use one resource to make a decision with. Do a search for Workflows, parallel processing and RunSpaces to get a deeper understanding of parallel processing with PoSH before you move forward with this effort.

Why multiple Exchange shells?
There is only one Exchange Org in a forest, and any EMS session you start, implicitly (New-PSSession) or explicitly (Enter-PSSession), is talking to the same Org information.

actually, my requirement is to run database seeding for multiple DBs at a time. As Seeding takes time and resources to complete. I just want to distribute this job on different DAG servers.