Today we’ll be going over How to use Powershell to Force gpupdate on all domain computers within your network.
Every 90 minutes, client PCs refresh Group Policies. In this article, I use a PowerShell command to remotely execute gupdate on every client pc inside an organizational unit within our Domain.
Command for PowerShell to Force GpUpdate on all Domain Computers
Execute the command below on a Domain Controller – Our computing.net domain to administer gpupdate on every client pc of the organization unit workstations:
Get-ADComputer -Filter * -SearchBase "OU=Workstations,DC=computing,DC=com" | Foreach-Object {Invoke-GPUpdate -Computer $_.name -Force -RandomDelayInMinutes 0}
Taking a short peek at the PCs on which the updates were carried out reveals what takes place: gpupdate is starting and cmd appears.
Simply execute the command to administer gpupdate whenever you want to.
Get-ADComputer -Filter * | Foreach-Object {Invoke-GPUpdate -Computer $_.name -Force -RandomDelayInMinutes 0}
It is worthy of note however that both client and mainframe systems will be forced to run gpupdate by this command.