How to refresh the Group Policy Settings on remote computers

Article translations Article translations
Article ID: 556027 - View products that this article applies to.
Author: Nirmal Sharma MVP
Expand all | Collapse all

SUMMARY

The following knowledgebase explains the scenario in which you need to refresh the Group Policy Settings on a remote computer.

MORE INFORMATION

The Group Policy Settings are refreshed as per the interval configured in the Group Policy for client computers, member servers and domain controllers. You can use the following command line tools to refresh the Group Policy Settings on remote computer. You need to log on to the computer manually and then perform the action suggested below:
 
For Windows XP computers:
 
Gpupdate.exe /Target:User /force
Gpupdate.exe /Target:Computer /force
 
For Windows 2000
           
            Secedit.exe /refreshpolicy user_policy
            Secedit.exe /refreshpolicy machine_policy
 
To refresh the policy on remote computer or computers you can use the following script to do so:
 
  1. Create a ComputerList.txt
  2. Put all the remote computers in the Text file.
  3. Use the Psexec.exe tool to execute the command remotely.
 
For Windows XP Computers:
 
Psexec.exe -@ComputerList.txt Gpupdate.exe /Target:User /force
Psexec.exe -@ComputerList.txt Gpupdate.exe /Target:Computer /force
 
For Windows 2000 Computers:
 
Psexec.exe -@ComputerList.txt secedit.exe /refreshpolicy user_policy
Psexec.exe -@ComputerList.txt secedit.exe /refreshpolicy machine_policy
 
The above Psexec.exe command will run on all the computers specified in the ComputerList.txt.
 
You can also use the following script to check the version of Operating System and then issue the command:
 
@echo off
 
XPGPORef1=gpupdate.exe /Target:User /force
XPGPORef2=gpupdate.exe /Target:Computer /force
 
Win2kGPORef1=secedit.exe /refreshpolicy user_policy
Win2kGPORef2=secedit.exe /refreshpolicy machine_policy
 
For /f “Tokens=*” %%a in (ComputerList.txt) Do (
 
SET Comp_name=%%a
 
Ver.exe \\%comp_name% > Hostver.txt
 
Find /I “XP” < Hostver.txt > CheckCC.txt
 
IF %errorlevel% == 0 (
 
Psexec.exe \\%comp_name% Gpupdate.exe /Target:User /force
Psexec.exe \\%comp_name% Gpupdate.exe /Target:Computer /force
 
) ELSE (
 
Psexec.exe \\%comp_name% secedit.exe /refreshpolicy user_policy
Psexec.exe \\%comp_name% secedit.exe /refreshpolicy machine_policy
)
 
The above script will check the Operating System version by executing Ver.exe on remote computer and then run the appropriate commands to refresh the Group Policy Objects.
 
           

Properties

Article ID: 556027 - Last Review: September 27, 2007 - Revision: 1.0
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows 2000 Enterprise Edition
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Service Pack 4
  • Microsoft Windows 2000 Standard Edition
Keywords: 
kbpubmvp kbpubtypecca kbhowto KB556027
COMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com