PowerShell command to prevent accidental deletion
To enable the feature to prevent accidental deletion for all user objects within Active Directory, use the following PowerShell command.
Get-ADObject -filter {(ObjectClass -eq "user")} | Set-ADObject -ProtectedFromAccidentalDeletion:$true
The command above should enable the parameter for all user and computer accounts within Active Directory.