Listing the Home Directory Values for Domain Users

A simple dsquery command piped to dsget will show us the home directory for all users in an Active Directory domain.

dsquery user -limit 1000 | dsget user -hmdir

To change the home directory setting, use a variation on the same command.

dsquery user -limit 1000 | dsmod user -hmdir \\server\share\$username$

The $username$ variable will be populated with the value of the current user’s account name.



Google