It will be saved to a server in a folder named as the current date.
- Run this script using a schedule task
Open the Task Scheduler on your server.
Right-Click on "Task Scheduler Library" and select "Create a Basic Task".
Define a Name/Description, Trigger...
On the "Action" section you have to select Start a Program and enter the following options.
Program/script: powershell
Add arguments (optional): -file "C:\admin\Scripts\GPOBackup\GPOBackupV2.ps1"
Add arguments (optional): -file "C:\admin\Scripts\GPOBackup\GPOBackupV2.ps1"

On the "Finish" section checking "Open the Properties dialog for this task when I click Finish" and click "Finish".
To run whether user is logged on or not, select the option in the General tab, click ok and enter credentials.

- Import GPO Backups
To import the backed up GPOs you can use the GPMC:
Right-click "Group Policy Objects" and click on "Manage Backups..."

or using the Powershell command import-gpo:
No comments:
Post a Comment