Link to home
Start Free TrialLog in
Avatar of Porffor
PorfforFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to get my PsExec gpupdate 'for' command to execute concurrently

I currently have a very simple batch file that I use to do a 'gpupdate' on my 45 XenApp servers.  What I have is...

for /f %%i in (\\server\software\Batches\XEN##.txt) do \\server\software\Batches\PsExec.exe \\%%i gpupdate

and then in the XEN##.txt file I have a list of my 45 servers.

This works great, however it can only do it sequentially, i.e. it takes more than 30 seconds to finish the gpupdate on XEN01, and only then will it begin the gpupdate on XEN02, so of course it takes almost 30 mins to finish doing all of them.

Is there a way to restructure the above so that the gpupdate command runs simultaneuosly on all the 45 servers?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Abhilash Pappiyil
Abhilash Pappiyil
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Porffor

ASKER

Excellent!  That worked.  Thanks.