When attempting to delete computer objects which contain child objects (ie. shares, printers, etc), a PowerShell script may fail with this error:
Error that is returned is:
Error: PSV063U2019 :: System.DirectoryServices.DirectoryServicesCOMException (0x8004106E): Exception from HRESULT: 0x8004106E
at Quest.ActiveRoles.ArsPowerShellSnapIn.BusinessLogic.Directory.Actions.DeleteTreeAction.Execute(IEnumerable`1 controls)
The error returned was due to object security: You need 'Delete Subtree' permissions in Active Directory before you can delete computer accounts which have child objects.
Assign 'Delete Subtree' permissions to computer objects on the OU where you plan on deleting computers.