Windows operating systems, regardless of their edition, offer us various utilities for global system administration, these tools are basically the group policy editor, also known as the GPO, and the registry editor..
Both tools are practical and allow control over many system values, but one of the differences, and perhaps the most radical, is that when making any changes using the Registry Editor in any key, value DWORD or another, we will receive a notification similar to the following:
This does not happen when we edit any group policy since the process is invisible and is carried out automatically which can be a critical point in case of executing any policy in error.
The reason for this process is that while the registry editor has an option to create backup copies and restore the configuration that we have enabled, the group policy editor does not have it..
In this tutorial we will analyze how to create a backup copy and restore, in case the circumstance needs it, the group policies or GPO in Windows.
To access the local group policies we will use the key combination Win + R and execute the command:
gpedit.msc
and to access the registry editor we will execute:
regedit
Group Policy Objects are part of the Group Policy Management Console. Typically, the Group Policy Management Console are the ones we use to manage company servers.
To access GPMC, we must first install it from the Control Panel and then use the Run command:
gpmc.msc
1. Create backup copy of Windows 10 Local Group Policy Editor settings
In this case we will use Windows 10 but the process is similar in the other editions of Windows. There is no built-in option to back up Group Policy Editor settings, but it is possible by backing up relevant files and folders on our C drive.
Step 1
To do this, we go to the file explorer and go to the path C: \ Windows \ System32 and there we must go to the "View" menu and in the "Show or hide" group select the "Hidden elements" box:
Step 2
In this way we can see all the hidden folders in the system. With all the folders visible, click on the “GroupPolicy” folder:
Step 3
When you access it, this will be its content. There we can see two folders destined for team policies (Machines) and local users (User).
We will copy the contents of this folder to another folder on another partition or drive. Depending on the Group Policy settings, we may or may not see additional files and folders along with the normal "Machines" and "User" folders..
In this way we have endorsed Windows group policies.
2. Restore group policy settings in Windows 10
To restore Group Policy settings, all you have to do is copy the contents of the backup that you previously backed up and paste it into the original folder. that is, in
"C: \ Windows \ System32 \ GroupPolicy"
Step 1
Because the content is being pasted directly into the system drive, we will be asked to provide administrative permissions. Select the "Do this for all current items" check box and click the "Continue" button.
Step 2
Once we copy the content in the original path, we must go to the command prompt, run it as administrator and use the following line:
gpupdate / force
In this way we force the changes to be applied. It's that simple we can back up and restore group policies in Windows environments.