?
Solved

Deleting old objects using dsquery | dsrm command

Posted on 2008-01-30
1
Medium Priority
?
3,646 Views
Last Modified: 2011-01-27
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
0
Comment
Question by:James_Howe
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 750 total points
ID: 20777818
I believe this happens because AD sees computers as containers.  Try adding the -subtree switch to dsrm.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question