I was working with OU's and just trying to find out
Is there any way I can check whether OU is protected from accidental deletion or not?
I googled it but couldn't found any solution.
I am looking for solution in C# not scripting.
Thanks in advance
You could do a simple line in powershell with active directory cmdlet Get-ADObject -Filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $true}
And later if you want to change it - pipe it to | Set-ADObject -ProtectedFromAccidentalDeletion:$false