We are planning to use the EmployeeNumber user attribute in AD to create the path to each user's Home drive. Reason for this is that AD user names are currently based on last name, which changes often in our large domain. We want to get away from managing name changes. In the future we may transition to employee number as user name but we're not there yet.
Currently I am using a foreach loop in Powershell to accomplish setting the path for each user in AD, but I would like to investigate maybe using Group Policy Preferences so that I can set a friendly label on the mapped drive. However I'm stumped on getting the EmployeeNumber into the path.
How can I get the EmployeeNumber attribute into the user HomePath as a variable?