I am tired a lot finding a solution for my issue. I have developed all my logic and all now I need is to run ths script simultaneously for several computers. I thought to implement this by jobs but unfortunately I realized from previous QA its not so easy to implement -AsJob feature to custom functions/modules.
My complete requirement !!
I have several DAGs in exchange environment, lets say 50 DAGs. I want to reboot all first nodes from each 50 DAGs at one time. Once after successful reboot of all first nodes then I will have proceed with second node and so forth. Before and after reboot I must do some health checks and log all results.
Up to what I finished my coding?
- The first attachment will validate all prerequisites and returns the node names those should reboot in first batch (each first node from 50 DAGs)
- The second attachment will perform health checks.
Where I struck?
- In my prod environment PS remoting is not enabled and cannot be enabled.
- I don’t know how run each batch computer’ s health checks simultaniously like, -AsJob or by calling the script along with prarameters in another Power Shell window.
- I am even OK if I can open each computer’s health checks script in another PS window but I must be able to capture the outputs /logs.
Where I run all these?
- I am not going to run these script on any prod servers. I will run these from regional admin servers.
Somewhere in Google found the below code. Please suggest if I can implement.
$command = ("notepad.exe") $process = [WMICLASS]"\\$ComputerName\ROOT\CIMV2:win32_process" $result = $process.Create($Command)
Please some one help me to finish this project.