There are two main ways to backup and restore Group Policy Objects (GPOs): using the Group Policy Management Console (GPMC) or using PowerShell.
To backup GPOs using the GPMC:
Open the GPMC.
Expand the Group Policy Objects container.
Right-click the GPO(s) that you want to backup and select Back Up.
In the Backup Group Policy Object dialog box, specify the path to the folder where you want to save the backup file.
Click Back Up.
To restore GPOs using the GPMC:
Open the GPMC.
Expand the Group Policy Objects container.
Right-click the Group Policy Objects container and select Manage Backups.
In the Manage Backups dialog box, click Browse to locate the backup file that you want to restore.
Select the GPO(s) that you want to restore and click Restore.
To backup GPOs using PowerShell:
Open a PowerShell console.
Import the Active Directory module:
PowerShell
Import-Module ActiveDirectory
Use code with caution. Learn more
Use the Backup-GPO cmdlet to backup the GPO(s) that you want:
PowerShell
Backup-GPO -Name (GPO name) -Path (backup file path)
Use code with caution. Learn more
To backup all GPOs in the domain, use the -All parameter:
PowerShell
Backup-GPO -All -Path (backup file path)
Use code with caution. Learn more
To restore GPOs using PowerShell:
Open a PowerShell console.
Import the Active Directory module:
PowerShell
Import-Module ActiveDirectory
Use code with caution. Learn more
Use the Restore-GPO cmdlet to restore the GPO(s) that you want:
PowerShell
Restore-GPO -Name (GPO name) -Path (backup file path)
Use code with caution. Learn more
To restore all GPOs in the domain, use the -All parameter:
PowerShell
Restore-GPO -All -Path (backup file path)
Use code with caution. Learn more
It is important to note that you should regularly backup your GPOs so that you can restore them in the event of a problem. You should also store your backups in a safe and secure location.
Ещё видео!