WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Microsoft Client
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Refresh Group Policy using SecEdit.EXE

Keywords:     refresh group policy secedit.exe  refresh user manager

Question:

how do you do what secedit.exe does without using DOS ?

Answer:

Background on SecEdit.Exe:

When an administrator changes a Group Policy Object (GPO), the change takes place on a domain controller (typically the Windows domain controller holding the primary domain controller Flexible Single Master Operation [FSMO] role). The change is then replicated to other domain controllers through Active Directory and SYSVOL replication. At regular intervals, domain controllers and clients check for modifications to the GPOs. If any changes exist, they are applied.

If immediate re-evaluation and application of group policy is necessary, you can invoke a command that triggers this process. For additional information about the default intervals for background refresh of Group Policy, click the article number below to view the article in the Microsoft Knowledge Base:

Also see: Microsofot Article Q203607

To trigger Group Policy application for the local computer, type the following line at a command prompt:

   Run(Environmment("COMSPEC")),"/c secedit /refreshpolicy machine_policy")
To trigger Group Policy application for the currently logged on user, type the following line at a command prompt:
   Run(Environmment("COMSPEC")),"/c secedit /refreshpolicy user_policy")
Normally, if the GPOs that define the environment for the user have not changed from the last time Group Policy was applied, the GPO is skipped and not applied again. In either case, specifying /enforce on the command line re-applies the policy even if the GPOs that apply to the computer or user have not changed. An example of the command line in this case is:
   Run(Environmment("COMSPEC")),"/c secedit /refreshpolicy machine_policy /enforce")
After Windows 2000 has accepted the request, the following text should be displayed to the user:

Group policy propagation from the domain has been initiated for this computer. It may take a few minutes for the propagation to complete and the new policy to take effect. Please check Application Log for errors, if any.


Article ID:   W15188
File Created: 2009:02:19:09:18:58
Last Updated: 2009:02:19:09:18:58