As long as your user account that you’re signed in as is a member of the Domain admins group this command can be run from a terminal joined to the domain.
Backup all GPOs in Domain
Open powershell and use the following command:
PS C:\> Backup-Gpo -All -Path "\\Server1\GpoBackups"
Restore all GPOs in Domain
Use the “Restore-GPO” cmdlet.
PS C:\> Restore-GPO -All -Domain "contoso.com" -Path "\\Server1\Backups"
Recover a specific GPO