← Back to Tools Index
[ Active Directory OU Protection Management ]

About This Tool

Unprotect OUs is a PowerShell script that removes accidental deletion protection from multiple Active Directory Organizational Units (OUs) at once. It supports wildcard patterns for flexible bulk operations, making it ideal for cleanup tasks or reorganization projects.

Key Features

Parameters

Usage Examples

Unprotect a specific OU

.\\unprotectOUs.ps1 -SearchBase "OU=Workstations,OU=Computers,DC=domain,DC=local" -OUName "Deploy Printer Logic"

Unprotect all OUs starting with "Deploy"

.\\unprotectOUs.ps1 -SearchBase "OU=Workstations,OU=Computers,DC=domain,DC=local" -OUName "Deploy*"

Unprotect all OUs containing "Printer"

.\\unprotectOUs.ps1 -SearchBase "OU=Workstations,OU=Computers,DC=domain,DC=local" -OUName "*Printer*"

Unprotect ALL OUs under the search base

.\\unprotectOUs.ps1 -SearchBase "OU=Workstations,OU=Computers,DC=domain,DC=local" -OUName "*"
IMPORTANT: This script requires:
- PowerShell with Active Directory module
- Domain Administrator or equivalent permissions
- Elevated PowerShell session (Run as Administrator)

How It Works

Output Example

Searching in: OU=Workstations,OU=Computers,DC=domain,DC=local Looking for OUs matching: Deploy* ---------------------------------------- Found 5 OU(s) matching 'Deploy*' ---------------------------------------- Processing: OU=Deploy Printers,OU=Workstations,OU=Computers,DC=domain,DC=local Current Protection Status: True New Protection Status: False Processing: OU=Deploy Software,OU=Workstations,OU=Computers,DC=domain,DC=local Current Protection Status: True New Protection Status: False ---------------------------------------- Summary: Total OUs found: 5 OUs unprotected: 4 Already unprotected: 1

Common Use Cases

Safety Notes

Download Script

Download unprotectOUs.ps1
← Back to Tools Index