How to reset all local group policy setting on windows?

Window

In this article, we learn about the use of local group policy editor in Windows. With the local group policy editor, we configure all of the systems like setting regarding personalization, system, networking and many of other settings like these. In total there are approx 2000 settings which can be modified by the Group Policy Editor. The Group Policy Editor has several infrastructural configuration options that allow us to make an adjustment to the specific performance and security settings for user and computer.

Also Read: How to fix Windows SmartScreen can’t be reached right now problem in Windows

The group policy object exists on every Windows PC. And these local group policy is divided into two categories as:

  1. Computer Configuration
  2. User Configuration

Here in the computer configuration, all the system wise policies are stored and in the user configuration, user-specific settings are stored. While these group policy settings are stored in a file named as Registry.pol under computer system drive.

There are four ways to reset the group policies to their default setting. These all methods are very straightforward but the one takes more time with respect to other depending on how many policies you can configure. These all four methods are named as using group policy editor, using the batch file, using VBS file, and using the command prompt.

METHOD 1:

IMPORTANT NOTE:- there are very few chances that something got wrong in this process. But if accidentally something got wrong then we can lose all data on our PC. So to avoid any data lose we have to create a backup of the system.

How to reset all group policy settings to default using Local Group Policy Editor

Step 1: First, open the run command window on your PC to do that press Windows key + R together.

Step 2: Now type gpedit.msc command in Run window and then click on OK.

gpedit.msc command

Step 3: Now follow the following path to open All Settings in the computer configuration. And then double click on All settings.

Local Computer Policy > Computer Configuration > Administrative Templates > All  Settings

local group policy editor

Step 4: Now you will see a list of settings here, now you have to shortlist the settings by the state to view only the enabled and disabled states of settings.

all settings in local group policy editor

Step 5: Now double click on settings, which states shown enabled and disabled, and then change this setting to Not Configured state and click on Apply and then click Ok. And repeat this step for each setting which state is enabled and disabled.

group policy settings state configuration

Step 6: Now we will change all these settings in the user configuration and to do that we will follow the same step as mentioned above, and to go the All settings in user configuration we will follow the following path:

Local computer policy > User configuration >  Administrative templates >  All Settings

METHOD: 2

How to reset all local group policy settings to default using a VBS file

To perform the VBS file method we have to log in as an administrator on our Windows PC. And here we need to create a VBS file, but don’t worry we will provide you a VBS file here. Now we will reset the group policy settings to default step by step:

Step 1: First, of all paste given below codes on your system in notepad and save these codes with “.vbs” extension. For example, save your file named as “satish.vbs” on your system then proceed to next step.

[css]RD /S /Q "%WinDir%\System32\GroupPolicyUsers"

RD /S /Q "%WinDir%\System32\GroupPolicy"

gpupdate /force[/css]

Step 2: Now Run this file as an administrator on your PC And then click on Yes if you see run prompt. And after that, if prompted by UAC then click on yes option.

Now local group policy settings have been reset back to default settings.

METHOD 3:

How to reset all local group policy settings to default using a BAT file

To perform the BAT file method we have to log in as an administrator on our Windows PC. And here we need to create a BAT file, but don’t worry we will provide you a BAT file here. Now we will reset the group policy settings to default step by step:

Step 1: First of all paste given below codes in notepad on your system and save these codes with “.vbs” extension. For example, you can save this file named as “satish.vbs” then proceed to next step.

[css]If WScript.Arguments.Count = 0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & "Run", , "runas", 1
Else

set winsh = CreateObject("WScript.Shell")
set winenv = winsh.Environment("Process")
windir = winenv("WinDir")

strPath = (WinDir "\System32\GroupPolicy")

DeleteFolder strPath

Function DeleteFolder(strFolderPath)
Dim objFSO, objFolder
Set objFSO = CreateObject ("Scripting.FileSystemObject")
If objFSO.FolderExists(strFolderPath) Then
objFSO.DeleteFolder strFolderPath, True
End If
Set objFSO = Nothing
End Function

strPath = (WinDir & "\System32\GroupPolicyUsers")

DeleteFolder strPath

Function DeleteFolder(strFolderPath)
Dim objFSO, objFolder
Set objFSO = CreateObject ("Scripting.FileSystemObject")
If objFSO.FolderExists(strFolderPath) Then
objFSO.DeleteFolder strFolderPath, True
End If
Set objFSO = Nothing
End Function

winsh.Run "gpupdate /force", 0

End If[/css]

Step 2: Now right click on the batch file and run this file as an administrator. And If prompted by UAC, then click on Yes option to continue.

Now all the local group policy settings have been reset back to default and now you can use your PC as well as before.

METHOD: 4

How to reset all local group policy settings to default using Command Prompt(Admin)

This method to reset the group policy settings to default is very easy. Here we have to run only three commands to change group policy settings. So now we will update group policy settings to default step by step using the command prompt.

Step 1: First of all open the command prompt on your system as the administrator to do so search for command prompt in the search bar and then open it as an administrator.

Step 2: Now type the following commands in the Command Prompt window one by one and press Enter.

[css]RD /S /Q "C:\Windows\System32\GroupPolicy"
RD /S /Q "C:\Windows\System32\GroupPolicyUsers"[/css]

In the above command instead of “C”, you will type your drive letter in which Window is installed. Generally, default directory where windows operating system and all the windows components are present(installed) that is named as Local Disk C.

Step 3: Now type gpupdate /force to complete the task by forcing the update or restart your computer to complete the task.

Now your local group policy will be set to default settings and now you can use your computer with the default group policy settings.

How to reset all local group policy settings to default without login into PC

Sometimes we are not able to login to our PC due to incorrect configuration of local group policy and here we have two option to log in to our PC first by reinstalling the windows where we can lose our data. And other is by resetting the group policy settings to default settings without login into the computer. Then we will choose reset the local group policy settings to default settings without login into the computer. Now we will reset the group policy settings to default step by step.

Step 1: First, boot PC with Windows installation DVD and when you see the Windows setup screen, press Shift key + F10 key together to open the command prompt.

Step 2: Now at the command prompt, use the directory command to find the drive where Windows is installed as shown here:

For directory D type: dir D, For directory C type: dir C in command prompt

Step 3: Now run following commands on command prompt one by one. And in these commands “C” is the drive letter of Windows partition where you have to replace this letter with respect to your windows partition drive where Windows is installed.

[css]RD /S /Q "C:\Windows\System32\GroupPolicy"

RD /S /Q "C:\Windows\System32\GroupPolicyUsers"[/css]

Step 4: After successfully run these commands quit Windows setup and then eject out the DVD. Now restart your computer and your PC group policy settings should have been reset to default settings.

THAT’S IT

If you have any query regarding this article then you can ask your query in the comment section below. we will be here to solve your query as soon as possible.

Leave a Reply