PowerShell

PowerShell: Force gpupdate on all Domain Computers

Client Computers update Group Policies every 90 minutes. In this blog post I force gupdate on all client computer of an organizational unit by running a PowerShell command from a remote computer.

Run the following command on a Domain Controller of the domain pagr.inet to force gpupdate on all client computer of the OU workstations:

Get-ADComputer -Filter * -SearchBase "OU=Workstations,DC=pagr,DC=com" | Foreach-Object {Invoke-GPUpdate -Computer $_.name -Force -RandomDelayInMinutes 0}

A quick glance at the client computer shows what happens: cmd pops up and gpupdate is running. Cool.

1.PNG

To force gpupdate on all domain computers just run

Get-ADComputer -Filter *  | Foreach-Object {Invoke-GPUpdate -Computer $_.name -Force -RandomDelayInMinutes 0}

Note: This command will force gpupdate on client computers and server systems.

Related Links

For restarting all domain computers see my post: Restart all Domain Computers by using PowerShell.

For documenting your environment see: PowerShell: Documenting your environment by running systeminfo on all Domain-Computers

6 replies »

  1. Hatte probleme das der DC nicht verbunden werden konnte mit den clients! Daher habe ich gesucht und was gefunden (RPC)
    Ich musste eine Regel erstellen per GPO:
    diese 3 aktivieren:
    1. Remoteverwaltug geplanter Aufgaben RPC-EPMAP

    2. Remoteverwaltug geplanter Aufgaben RPC

    3. Windows Verwaltungsinstrumentation WMI

    Dann ging es auch mit den Clients ein gleichzeitiges GPupdate zu machen.

    Liked by 1 person

Leave a Reply to Wolfgang Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.