SID-500

Home » PowerShell » PowerShell: Force gpupdate on all Domain Computers

PowerShell: Force gpupdate on all Domain Computers

Client Computers update Group Policies every 90 minutes. In this blog post i will 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


2 Comments

  1. […] For forcing a gpupdate on all domain computers see my article: PowerShell: Force gpupdate on all Domain Computers […]

    Like

Leave a 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 )

Google+ photo

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

Connecting to %s

Categories

Who is the blogger?

My name is Patrick Grünauer (pewa2303). I am from Austria. On sid-500 I write about Windows, Cisco and IT-Security in English and German. Have fun while reading!

Patrick Gruenauer
Follow SID-500 on WordPress.com