Deleting old objects using dsquery | dsrm command

I've seen a loads questions regarding the use of the dsrm command to delete old objects in Active Directory but unfortunately it doesn't seem to work for me. I have been tasked with removing old objects in AD and I was running  dsquery computer -inactive 52 -limit 0 to obtain objects a year or more old which worked fine. I then ran the same command but with | dsrm added but I get a "The directory service can perform the requested operation only on a leaf object". What do I need to do to rectify this?

I know there are 3rd party tools but my company aren't will to pay for such a product

For info purposes the domain is running at the Windows 2003 Functional level
James_HoweAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shift-3Commented:
I believe this happens because AD sees computers as containers.  Try adding the -subtree switch to dsrm.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.