Sunday, October 10, 2010

Show where Windows home directories are

In our AD, user's home directories are stored on various file servers. So when it's time to migrate them to a new file server, how do we determine who needs to get moved off the old one? ldapsearch to the rescue:


ldapsearch -x -LLL -E pr=2000/noprompt -h rov-dc -D Administrator@example.com -W -b 'cn=Users,dc=example,dc=com' -s sub homeDirectory | awk '$1 = /homeDirectory:/ {print $2}' | sort

1 comment:

  1. I should mention that I got a significant leg-up from Eldapo: http://eldapo.lembobrothers.com/2008/01/30/searching-active-directory-with-ldapsearch/

    ReplyDelete