Solved

Remotely Run a Group Policy Update

Posted on 2008-06-19
4
1,547 Views
Last Modified: 2011-01-30
Looking for a VBscript that will refresh group policy on a remote computer.  (the equivalent of running gpupdate /force from the command line of a local machine).  I'd like to launch the script from my WinXP machine, have it ask me for a computer name, and then refresh the group policy on the target machine.  This is in a W2K3 environment.
Thanks!
0
Comment
Question by:azstbzimms
  • 3
4 Comments
 
LVL 77

Accepted Solution

by:
Rob Williams earned 350 total points
ID: 21827661
You can run any command remotely using the free PSExec tool from Sysinternals/Microsoft
psexec  \\Computername  gpupdate /force
This can be included in a script.
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 21827673
By the way if you want to apply it to a series of computers you can use a text file list of computers and include that in the command rather than one specific PC. See the syntax in the link above.

Also because gpupdate often returns a response asking if you want to log off now, to deal with that you may want to use the  /logoff or /boot switches with the gpupdate command.
http://technet2.microsoft.com/windowsserver/en/library/6880fef3-76b7-4eb3-b993-fa00799615851033.mspx?mfr=true
0
 
LVL 2

Expert Comment

by:j0rdan
ID: 21828694
If your PC has the 2k3 AdminPak, I would *highly* recommend SpecOps GPUpdate add-in for the AD snap-in.

http://www.specopssoft.com/products/specopsgpupdate/

It integrates into the snap-in and will let you run multiple commands to any computer on the domain (including gpupdate, reboot, etc).
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 21850982
Thanks azstbzimms.
Cheers !
--Rob
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now