joolsyjoolsy Posted December 4, 2007 Posted December 4, 2007 hey all! I've been looking at clearing these old accounts out - cant really use the tools out there would like to stick with the micorosft tools : So I have been looking at using either dsquery computer -inactive (noofweeks) {doesn't work on my network} and dsquery computer -stalepwd (noofdays) {works ok on my network} which apparently you can pipe with the dsrm command. i can get the list of inactive accounts ok but i cant seem to get the switch right to remove them in that line. have tried dsquery computer -stalepwd 180 ¦ dsrm and it errors with startnode incorrect format. any one out there can show me the light? think i am being a bit blind here! ta j
Geoff Posted December 5, 2007 Posted December 5, 2007 you can only pipe the output from 'dsquery computer -inactive (weeks)' to dsrm. So you'll have to get that working if that's what you want to do.
mrforgetful Posted December 5, 2007 Posted December 5, 2007 I know you said you wanted to use the built in stuff but AD Manager Plus does some good reports, quick and easy to install with fully functional 30 day trial. I always liked that program but never got it, when my trial ran out I'd done all I needed to.
localzuk Posted December 5, 2007 Posted December 5, 2007 To get it working you need to raise the domain functional level to Windows 2003 native. Then wait a period of time for the attributes to actually mean anything.
sahmeepee Posted December 5, 2007 Posted December 5, 2007 Either way, that won't make dsrm work.. you just need to add the -noprompt switch to get it to accept input from STDIN properly: dsquery computer -stalepwd 180 | dsrm -noprompt (also your pipe character wasn't the same as mine, but I'm not sure if that's the forum mangling it)
JOrdan01070 Posted December 5, 2007 Posted December 5, 2007 try something calld oldcmp it is just an exe file but it is very good and can output in html, csv etc below is the address. http://www.joeware.net/freetools/tools/oldcmp/index.htm Jordan
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now