Solved

Remotely Run a Group Policy Update

Posted on 2008-06-19
4
1,543 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

Join & Write a Comment

Learn about cloud computing and its benefits for small business owners.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
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 …

760 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