No announcement yet.

Home Folder Creation

  • Filter
  • Time
  • Show
Clear All
new posts

  • Home Folder Creation

    I am running a file server that is Windows 2003 and Active Directory 2003. Currently, we setup home folders through the properties of the user and would like to continue doing so.

    It had been mandated that we provide a home folder for all users in the organization to prevent data loss in accordance with a new IT policy.

    I am looking for help on a script that will look at a user account inside of a departmental OU, if it has a home letter/path assigned, it will skip the user. If a user does not have a letter/path assigned, it will assign it a drive letter of W: and a path of \\server\share\%username%.
    MCITP:SA, MCSA 2003, MCP, CCNA, A+, Net+, Security+

  • #2
    Re: Home Folder Creation

    Dsquery and dsget are the tools you need.

    First off, create a dsquery query (no pun intended) that returns all the users you wish to modify.

    Pipe the dsquery output to dsget user -hmdir which will print the home directory.

    You now know if the user has (valid) home dir. The next step depends on your scripting solution, but dsmod is the tool for modifying the user's properties.