GPO Backup and Report script

PowerShell script to periodically back up the Group Policy and documentation of version using HTML reports. Ideal as a scheduled task to perform regular backups of the GPO. Each backup creates a new subfolder with a time stamp.Only the variable $path must be adjusted to the desir

5 Star
1,451 times
Add to favorites
Group Policy
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Why this error?
    2 Posts | Last post March 03, 2018
      Get-EventLog : No matches found
      At C:\scripts\bk\get-GPOBackup.ps1:125 char:8
      +   if(( Get-EventLog -LogName Application -Source "GPObackup").count -eq 0)
      +        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (:) [Get-EventLog], ArgumentException
          + FullyQualifiedErrorId : GetEventLogNoEntriesFound,Microsoft.PowerShell.Commands.GetEventLogCommand
      In Eventlog:
      Backup of GPO failed. Error [The system cannot find the path specified.
       Details -
           Source GPO:
                DisplayName: WIN WSUS MX-INFRA
                ID: {0065D46C-AF0B-4F43-B9ED-01A1E387D8C0}
                Domain: xxx.xxxx
               Directory: .\
               Instance : {0FEEC9C1-3977-43D6-A9B3-FAF1038EEBA3}
               Comment  : 
    • Hi Zhiaga, thake the new Version, ther is an issue with some Characters in GPO names, also with a Space. Version 1.55 is fixing this. If it help, please Vote for this script.
  • Error out on GPO's with ":"
    2 Posts | Last post March 03, 2018
    • Fabian, great script thanks!  Just a note script errors out on GPO's with colon (:) character in it - line 101:3 New-Item, which makes sense why because the path is not valid in Window FS.  Maybe put a check into your script for it?  If not just a quick statement.
    • Hi bpierce, take the new version, there is a fix for Unwanted characters. I hade the same issue at a customer side.