markwilliamson2001 Posted December 19, 2007 Posted December 19, 2007 I am trying to free up some space on one of our curriculum servers. We have a lot of disabled staff accounts, of those teachers who have left. This means we also have a lot of home directories which could be removed. I am currently trying to use dsquery user to find out which accounts are disabled. So far success... dsquery user ou=staff,dc=chase,dc=local -disabled I now however wish to include the staff accounts home directory in the query, and have come unstuck a little. Is there also anyway of outputting the query results to a csv file or txt file? I know something similiar can be done with csvde, but again, I came unstuck at the LDAP query point... Any help much appreciated. Mark
sahmeepee Posted December 19, 2007 Posted December 19, 2007 you'll need to pipe it into dsget like: dsquery user -disabled | dsget user -samid -hmdir You can split the data up in excel if you redirect the output to a text file (put "> file.txt" at the end of the line above).
markwilliamson2001 Posted December 19, 2007 Author Posted December 19, 2007 Thanks that worked a treat! Mark
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