# Import-Module GroupPolicy
# Neues GPO erstellen
New-GPO -Name “Hardening”
# GPO Vervielfältigen
Copy-GPO -Sourcename “Hardening” -TargetName “Hardening2”
# GPO verlinken aktivieren
New-GPLink -Name “Hardening2” -Target “OU=Server,OU=ORG,DC=dwp,DC=de”
# GPO Zuweisung (Security Filtering) entfernen
Set-GPPermission -Name “Hardening2” -Replace -PermissionLevel None -TargetName ‘Authenticated Users’ -TargetType Group
# GPO einer Gruppe zuweisen (Security Filtering)
Set-GPPermission -Name “Hardening2” -PermissionLevel GpoApply -TargetName ‘GP-ServerHardening’ -TargetType Group
# GPO Reihenfolge (Order) ändern
Set-GPLink -Name “Hardening2” -Target “OU=Server,OU=ORG,DC=dwp,DC=de” -Order 1
# GPO Verlinkung deaktivieren
Set-GPLink -Name “Hardening2” -Target “OU=Server,OU=ORG,DC=dwp,DC=de” -LinkEnabled no
# GPO entfernen
Remove-GPO -Name “Hardening2”