VBScript program to update the profilePath attribute for the users specified in a Microsoft Excel
spreadsheet. The program reads the Distinguished Name of each user and the new value for the
profilePath attribute from the spreadsheet. The Distinguished Name is in the first column, the
profilePath in the second column. The first row of the spreadsheet is assumed to be column headings
and is skipped. The program processes each row after the first until a blank entry is encountered
in the first column. The program binds to each user and sets the profilePath attribute to the value
specified for that user. If the value of profilePath is the special value ".delete", the
attribute is cleared (set to Null).
The program CreateUserList3.vbs can be used to create a spreadsheet with the Distinguished Names of all users in the domain. Then, this spreadsheet can be modified to only include the Distinguished Names of users that you want modified. The appropriate value for profilePath should then be entered in the second column. All the profilePath values can be made the same, or they can be different for each user. You have the power of the spreadsheet program at your disposal if you want to have the spreadsheet calculate the value of profilePath for you based on a formula.
If any Distinguished Names specified in the spreadsheet have a character that must be escaped, such as a comma, be sure to escape the character with the backslash escape character, "\". The characters that must be escaped are:
, \ / # + < > ; " =
For example, the Distinguished Name of a user with Common Name "Wilson, Jane" might be:
This program can be easily modified to update any single-valued string or numeric attribute of user
objects. You would modify the program to replace all instances of the string "profilePath"
with the name of the attribute you wish to modify.
UpdateUserProfile.txt <<-- Click here to view or download the program