I need help with this script that suppose to back up GPOs. It is not working.....What are the requirements to run this script? Where should I run it from?
when I run this script, all is does is opening the notpad with the script inside. It doesn't run.
Do I need to run it from server with Group Policy Management Tools installed, etc?
I did change the directory to my server directory.
# Script By: Tim B.
# This script Backup all GPOs and save it to a folder named as the current date.
# Change the Path "\\server\c$\Backup\GroupPolicies\$date" to your server path
$date = get-date -format M.d.yyyy
New-Item -Path \\server\c$\Backup\GroupPolicies\$date -ItemType directory
Backup-Gpo -All -Path \\server\c$\Backup\GroupPolicies\$date