The following command will retrieve the computer objects from the Servers OU and run the Invoke-GPUpdate against them.
You must be signed in as an administrator to update Group Policy settings. Causes a logoff after the Group Policy settings are updated.
Sets the number of seconds to wait for policy processing to finish. This is required for those Group Policy client-side extensions that do not process policy on a background update cycle but do process policy when a user logs on.
This method supports a Group Policy refresh for Windows Server 2012 R2 Preview, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows 8.1 Preview, Windows 8, Windows 7 and Windows Vista clients.
Open the GPMC, right click the OU of Computers you’d like to refresh and select Group Policy Update.
So bear this in mind if you’re running this against your desktops or laptops with users logged in. The following Powershell will get you a list of computers from the Servers OU and export them to a text file on the C drive. I’ve added a dummy first entry to the text file, for some reason PSExec fails the first entry so this gets around that.
11/02/17 I’ve written hundreds of posts about doing things with group policies.
This will return the number of computer objects in the OU, and ask if you’re sure.
This will run a GPUpdate /force on all computer objects in the OU selected and any child OUs and will refresh both the computer and user policies. This method, requires Server 2012, or Windows 8 with the remote server administration tools.
(see screenshot below) (Updates only changed policy settings) gpupdate OR (Updates all policy settings) gpupdate /force Enter the command you want to use below into the elevated command prompt, and press Enter.
(see screenshot below) (Updates only changed computer policy settings) gpupdate /target:computer OR (Updates all computer policy settings) gpupdate /target:computer /force Enter the command you want to use below into the elevated command prompt, and press Enter.
My problem is that after a few days windows automatically download updates and install them though I had set it to...