Force GPUpdate for all computers

Hi everyone !

Today I wanted to talk about a small tip if you need to refresh a computer gpo for some computer OU.

I will talk the powershell command let; Invoke-GPUpdate

The commad let is powerfull, as you can target a computer, and to update only user settings; that way;

Invoke-GPUpdate -Computer “DOMAIN\WORKSTATION-001” -Target “User”

The last command let I wanted to talk is a more complex’s one, like this one;

Get-ADComputer –filter * -Searchbase “ou=Site-A, dc=Domain,dc=com” | foreach{ Invoke-GPUpdate –computer $ -force}

That one will search a complete OU for all computer account, and invoke a gpupdate /force on them.

Before running it I suggest to try the Get-ADComputer command let to be sure it target computer you want;

Get-ADComputer –filter * -Searchbase “ou=Site-A, dc=Domain,dc=com” | fl

Make sure you know that the remote user will see a gpupdate’s windows, to have it hidden make sure you use -AsJob in your command let.

Thansk everyone for listening