+ Post New Thread
Results 1 to 3 of 3
Windows Thread, dsquery help in Technical; I am trying to free up some space on one of our curriculum servers. We have a lot of disabled ...
  1. #1

    Join Date
    Sep 2005
    Posts
    153
    Thank Post
    1
    Thanked 4 Times in 4 Posts
    Rep Power
    19

    dsquery help

    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

  2. #2
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    34

    Re: dsquery help

    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).

  3. #3

    Join Date
    Sep 2005
    Posts
    153
    Thank Post
    1
    Thanked 4 Times in 4 Posts
    Rep Power
    19

    Re: dsquery help

    Thanks
    that worked a treat!

    Mark

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •