VBScript program to update the profilePath attribute for the users specified in a Microsoft Excel spreadsheet. The program reads the NT logon name of each user and the new value for the profilePath attribute from the spreadsheet. The NT logon 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 NT logon name of a user is also called the "pre-Windows 2000 logon name". It is the value of the sAMAccountName attribute of the user object. The program uses the NameTranslate object to convert the NT logon name (in conjunction with the NetBIOS name of the current domain) to the Distinguished Name of the user. The program uses the Distinguished Name to bind to each user with the LDAP provider and set the profilePath attribute to the value specified for that user in the spreadsheet. If the value of profilePath is the special value ".delete", the attribute is cleared (set to Null).

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.

UpdateUserProfile2.txt <<-- Click here to view or download the program