Periodically as part of troubleshooting an issue, IT may ask you to refresh the group policies on your Windows computer. This article describes how to do that. Show
Windows 10 Right click on the Start Menu Button and another menu appears. Click on either Command prompt or command prompt (Admin) to open the CMD window.
On newer versions of Windows 10, you may see an option for Windows PowerShell instead of Command Prompt. The two are interchangeable for the purposes of these instructions. Step 2) Run gpupdate /force Within the Command Line window, type gpupdate /force and then press Enter on your keyboard. The line "Updating Policy..." should appear in the Command Line window below where you just typed. Step 3) Restart Your Computer When the update has finished, you should be presented with a prompt to either logoff or restart your computer. Press N to reject those prompts and then manually restart your computer. It's best to completely restart the computer, and it is slightly faster to reboot manually than to reboot through the Command Line window. Sometimes you will not be presented with a prompt to restart or logoff after the update. However, you should still restart your computer unless otherwise instructed by IT. The command Group Policies are used to change security settings and for system management (like deploying printers or mapping network drives). For troubleshooting IT problems, it’s sometimes necessary to update the group policy manually.
GPUpdate vs GPUpdate Force commandThe gpupdate /force command is probably the most used group policy update command. When you use the If you have a large tenant or a lot of GPO’s, then it’s better to only run gpupdate without the # Reapply all policies gpupdate /force # Get only the changed / new group policies gpupdate Update only user or computer group policiesIf you have a large environment or need to update the group policies on a lot of computers at the same time, then it can be useful to only update what is needed. This will reduce the load on the domain controllers and it’s of course faster. To do this you can use the # Update only the user policies gpupdate /target:user # Update only the computer policies gpupdate /target:computer Automatically reboot or logoff after GPUpdateNot all policy changes are applied immidiately. Due to Fast Boot, for example, are some settings only applied when the users logs in on the computer. Some settings even require a reboot to be applied. With the use of the
Run GPUpdate on a Remote ComputerSometimes you may need to update quickly the group policies on multiple computers because you changed the internet proxy settings or maybe to replace a printer for example. There are couple of ways to run GPUpdate on a remote computer Using the Group Policy Management ConsoleYou can initiate a group policy update on a whole OU with the Group Policy Management Console. It has to be an OU with only computer objects in it, so you can’t use the method on a user OU. Simply right-click on the OU where you have changed a policy and click on Group Policy Update
This will update the user and computer policies on all the computers in the given organization unit. The nice thing is that it will as for confirmation and show you how many computers are going to be updated.
After you have confirmed the update the policies will be updated and you can see the status of each computer. In this example 5 computers where turned off, so the update failed. Use PowerShell to run GPUpdate on a Remote ComputerWe can also use PowerShell to run gpupdate on remote computers. The only requirement is that you have Windows 2012 or later. Running it from Windows 10 is also possible, but then you need to open the PowerShell windows with a domain admin account. The basis of the command is the Invoke-GPUpdate cmd. We also need to specify the computer and the RansomDelayInMinutes. The RandomDelayInMinutes is used to lower the network load when you update a lot of computers at the same time. You can set it between 0 and 44640 minutes (31 days). Use 0 to run the update immediately. Invoke-GPUpdate -Computer "labrat01" -RandomDelayInMinutes 0 -Force If a user is logged on at the computer, then the Invoke-GPupdate command will ask the user for confirmation. By using the With this, we can create a small script to target all computers in a specific OU and run GPupdate on them. # Spread the load by setting the delay to between 1 and 30 minutes $random = Get-Random -Minimum 1 -Maximum 30 # Get the computers in an OU to update and run GPUpdate Get-AdComputer -SearchBase "OU=Computers,OU=Lab,DC=lazyadmin,DC=com" -Filter * | ForEach-Object -Proces {Invoke-GPUpdate -Computer $_.Name -RandomDelayInMinutes $random -Force} Or if you want to use a list of computers: # Based on a list $computers = "labpc01,labpc02,labpc03" $computers | ForEach-Object -Proces {Invoke-GPUpdate -Computer $_ -RandomDelayInMinutes $random -Force} Wrapping UpI hope this article helped you with the GPUpdate /force command. If you have any questions, then just drop a comment below. What is the Gpupdate command?The gpupdate command refreshes a computer's local Group Policy, and any Active Directory-based group policies.
What is Gpresult command?The gpresult command displays the resulting set of policy settings that were enforced on the computer for the specified user when the user logged on. Because /v and /z produce a lot of information, it's useful to redirect output to a text file (for example, gpresult/z >policy.
Which command can be used to update Group Policy immediately?The Invoke-GPUpdate cmdlet allows you to schedule a remote Group Policy update for a specified computer with all the options that the GPUpdate.exe command-line utility provides. This allows more freedom to determine which set of computers is to be refreshed than if you schedule the refresh through the GPMC.
How do I update Windows policy?To enable Microsoft Updates use the Group Policy Management Console go to Computer Configuration > Administrative Templates > Windows Components > Windows Update > Configure Automatic Updates and select Install updates for other Microsoft products.
|