Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Remove-ADComputer message: The directory service can perform the requested operation only on a leaf object

$
0
0

When I run this command:  Remove-ADComputer -identity $computername

I get this message:  "The directory service can perform the requested operation only on a leaf object."

This is because ADUC tells me in the "Confirm Subtree Deletion" window that "Object $computername contains objects."

The solution I found on the internet is to use the -recursive switch. Is this a safe action in order to delete only the specific computer from ADUC? Safe is my keyword. That is my concern at my new job.

Remove-ADComputer -identity $computername -recursive


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images