New version of get-GPOBackup
It has once again reached me a feature desire, and here is the implementation. With version 1.58 the group policy templates can be saved from the central store. This is especially good when importing new templates that may be buggy. This even happens to Microsoft with the German translations for Windows 10 times quite often. If you don’t know the script yet, I recommend having a look at the article: “Gruppenrichtlinien richtig sichern und dokumentieren“.
The new parameter is a switch called “PolicyDefinition”. To use the new feature, simply append “-PolicyDefinition”. The script creates a zip file of the central GPO memory. For me with my many templates, this is about 3 MB more per backup. Administrative permissions are not required for this feature.
Where can I get the new version?
As always either via the TechNet Gallery (short link: https://bit.ly/gpobackup), here I am happy about a vote if you like the script. Alternatively, it can also be found in the PowerShell Gallery and can (if the PowerShell Gallery is attached) be viewed with a simple
can be installed, or with
can be updated.
Wishes, suggestions or errors?
Just a comment, a mail or a comment at one of the two galleries. If the wish is plausible and I have time, I will install it.
Questions and answers
Also, I use this opportunity to publish a question, or better the answer to it: What is the best way to set up the GPO backup?
Short answer: Easy.
In-depth: Best as a scheduled task on a computer with PowerShell Active Directory and Group Policy modules. I just use a domain controller. I run the script once a day.
Setup for convenience, like me (installation via the PowerShell Gallery with default path), please customize to your environment, otherwise, this will not work:
Schtasks /create /RU "Administrator" /RP "password" /SC DAILY /TN "GPO-Backup" /TR "powershell.exe -WindowStyle hidden -ExecutionPolicy Bypass -nologo -noprofile get-GPOBackup.ps1 -BackupPath c:\GPOBackup -KeepDate 90 -PolicyDefinitions" /ST 06:06 /ET 08:00
Note about program and Power Shell Code
This article first appeared on Infrastrukturhelden.de in German.