IT Tutorials

Stop OU`s from being deleted


Everyone has seen users ,groups OU`s being  deleted accidentally from active directory, luckily we can now stop OU`s from being deleted by accidently. Follow the step by step guide below to stop this happening.


This can be done two ways, both simple, one from power shell and one from active directory users and computers.

1.) The power shell Method. First fire up power shell. Then enter the commands below.

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true

2) To check what OU`s are NOT protected enter..

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | ft

3) If you would like to do this to just an individual, go into active directory users and computers, Select the OU, right click it, go to object and put a tick in “protect from accidental deletion”.

Tags: Active directory

Allen White

Allen is a Consultant in the North East of England and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5 and HP ASE, AIS - Network Infrastructure.

Leave a comment



What Web Browser Do You Use?

View Results

Loading ... Loading ...


What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...