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 need to open the ACL on the object (the ntSecurityDescriptor attribute) and look for a Deny Everyone Delete. The ActiveDirectorySecurity class gives you a managed wrapper around this - http://msdn.microsoft.com/en-us/library/system.directoryservices.activedirectorysecurity.aspx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With