Cleaning up unlinked Group Policy objects in Active Directory with Powershell
Just a quick script below to run through all unlinked GPOâs in a domain, back them up, export a report and then remove them. Sweet and short but useful. (# Comment the remove line if you donât want to remove any) [cc lang=âPowershellâ] Import-Module GroupPolicyâ© $backupPath=âC:\Users\jeffrl-p\Desktop\Backup_GPOâ â©if (-Not(Test-Path -Path $backupPath)) {â© mkdir $backupPathâ© }â© â© ...
Just a quick script below to run through all unlinked GPOâs in a domain, back them up, export a report and then remove them. Sweet and short but useful. (# Comment the remove line if you donât want to remove any) [cc lang=âPowershellâ] Import-Module GroupPolicyâ© $backupPath=âC:\Users\jeffrl-p\D...