But if you have got OU presents from a migration or something else these OUs are not protected against deletion.
You can do it via the interface "Active Directory Users and Computers", right click on the "OU>properties>object>check the box 'Portect object from accidental deletion'".
If you can't see the "object" tab, it's because you have to activate the advanced features view. In ADUC, "View>Advanced Features".
If you have a lot of OUs, you would make this by a script...
So, open "Active Directory Module for Windows PowerShell" and enter this command
Get-ADOrganizationalUnit -filter * | Set-ADOrganizationalUnit
-ProtectedFromAccidentalDeletion $true
Aucun commentaire:
Enregistrer un commentaire