-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport_gpo.ps1
17 lines (12 loc) · 906 Bytes
/
import_gpo.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$Root = [ADSI]"LDAP://RootDSE"
$Domain = $Root.Get("rootDomainNamingContext")
$GPOName = 'Windows Event Forwarding Server'
Import-GPO -BackupGpoName $GPOName -Path "GPO\wef_configuration" -TargetName $GPOName -CreateIfNeeded
$GPOName = 'Domain Controllers Enhanced Auditing Policy'
Import-GPO -BackupGpoName $GPOName -Path "GPO\Domain_Controllers_Enhanced_Auditing_Policy" -TargetName $GPOName -CreateIfNeeded
$GPOName = 'Servers Enhanced Auditing Policy'
Import-GPO -BackupGpoName $GPOName -Path "GPO\Servers_Enhanced_Auditing_Policy" -TargetName $GPOName -CreateIfNeeded
$GPOName = 'Powershell Logging'
Import-GPO -BackupGpoName $GPOName -Path "GPO\powershell_logging" -TargetName $GPOName -CreateIfNeeded
$GPOName = 'Workstations Enhanced Auditing Policy'
Import-GPO -BackupGpoName $GPOName -Path "GPO\Workstations_Enhanced_Auditing_Policy" -TargetName $GPOName -CreateIfNeeded