|
RE: Running External Application You could create a loop that would check to see if the process you started is
still running. Something like this:
do {
Start-Sleep 20
} while ((Get-WMIObject -Query "SELECT * FROM Win32_Process WHERE Name =
'setup.exe'" -Computer $strComputer | Measure-Object).Count -gt 0)
You would have to replace "setup.exe" with what ever your install process
executable is and $strComputer with whatever variable you are using for the
computer name.
-= IJuan =-
"Jonathan P" wrote:
> I am trying to get powershell to read an OU in AD and install a
> program on each computer in that OU...i have it where it will show all the
> computers in the OU and "connect" to them but the application gets executed
> on all of them at once and doesnt work...i need to figure out how to stager
> it i guess.
>
> Maybe get it to where it runs on one and completes and then the next and
> completes and then the next and completes....etc |