I have this PS script for protecting AD objects that I got from a website, it works very well:
cls import-module activedirectory Get-ADObject -filter {ObjectClass -eq "user" -or ObjectClass -eq "group"} | Set-ADObject -ProtectedFromAccidentalDeletion:$true Get-ADOrganizationalUnit -filter * | Set-ADObject -ProtectedFromAccidentalDeletion:$true
My question: How do I rewrite line two so it only affects the members of the “Computers” group??
I need to temporarily set this value to ‘false’ so I can move 150+ computers to a group that’s enabled for WSUS updates but I’m not sure how to apply it only the “Computers” group…
I can comment out line four…
Thank you, Tom