Push GPUpdate to a List of Computers

Is GPupdate not working correctly? Wouldn’t it be nice to not have to go around to each workstation and run GPupdate manually in lieu of this? You can in fact push it out to a list of specified computers in a text file via Powershell. In this example I am also using PSexec to run the command.

foreach($adcomputer in Get-Content adcomputers.txt) {
	$command = {
		psexec -s \\$adcomputer gpupdate /force /wait:0
	Start-Job -ScriptBlock $command

If you run this for one workstation, it will create a new job on your computer to run the command on that workstation, meaning a new instance of Powershell and everything that goes along with it. If you’re trying to push this out to 400 computers, it basically tells your computer to open 400 Powershell windows under the hood, and it will likely max out a standard 8GB of RAM, so I would suggest pushing it out in segments.

Leave a Reply

Your email address will not be published. Required fields are marked *