I have a powershell script that exists on three servers. In this example the three servers are:
I am using another machine, server4, to call script C:\[url removed, login to view] remotely using Invoke-Command while specifying the remote machine via the ComputerName parameter. The ultimate goal of the script is to detect whether powershell is running, if it is not, then the computer is "not busy" and can open up the script being called remotely. If the computer is "busy", move onto the next server and continue on through the three machines until all the parameter values have been exhausted. If all machines are busy, it would be ideal if there was a way to periodically check the processes and see if they are still open. In this way, execution of the script can be balanced across the various machines, in an albeit primitive fashion.
The expected result trying to be achieved is attempting to load balance the script across the machines based on whether there is an active powershell process, if not move onto the next machine and perform the same test and subsequent possible execution. The script should go through all the values as specified in the $data array (or whatever).
Hello, Nice to meet you here. Maybe, are you Gehgman?, if no, no problem. I have a rish experiment in Powershell script. [login to view URL] This is service management sample. Thanks.