Discussion Locked

Active Directory Profile Path

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a question regarding the creation of user profiles whenthe account is created.

I understand that in the profile sections of a user object, you can assign home folders and profile paths for roaming profiles.

I also understand that you can use variables like %username& to create the folder named as such.

However, in my environment our home folders are LastName, Firstname and our profiles are called profile. So I have to enter \\server\share\Last, First\profile into each user account I create and then again for the home folder.

My question I thinks is obvious. How do i go about using a variable in this scenario. I have tried %lastname% %firstname% but it doesn't work. I also tried using the ADSI names as well %givenName% and %sn% but those don't work either.

Any ideas?

6 replies

by lowlands

If i remember correctly, %username% is the only variable that works in AD Users and Computers. So if you absolutely need to use the Last Name, First name setup for homedirectories, you might to resort to creating a small vb script or app that creates the directory (and sets permissions) and changes the AD properties for the user.

by blitzsonik

Scripting is not an option as I do not have the time research the syntax nor a test environment to fully test my scripts.

by yetanotheradmin

This can be done by using a VBScript to call a csv file and create ther user accounts. You wouldn't have to explicitly set the permissions on the foldes though. This involves a lot of work initially but will save a lot of time later. For help with the csv see
http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx If you set your spreadsheet up properly you would only have to enter the first and last names into the spreadsheet and then have the home folder column set to
"\\servername\share\"&B1&","&" "&A1 Where cell a1 is the first name and b1 is the last name. I'm still not sure if the space in the last folder name will cause you problems. After this, save the sheet as a .csv and run the VBScript.

by yetanotheradmin

To put quotes around to prevent problems with the space, make cell c1 " and change the home folder column to: =C1&"\\servername\share\"&B1&","&" "&A1&C1

by blitzsonik

Scripting is not an option as I do not have the time research the syntax nor a test environment to fully test my scripts.

This discussion is closed to new replies.