Hi All,Thanks Shawn for mentioning me. My idea is to create and user spreadsheet which is maintain by a non-IT person. Then write a script to
· convert the xls file to csv file or even read straight off the cells (though, converting the file first may have a better performance)
· base on the info within the the xle file such as name, Title, Team, and department, users are updated with the standard descriptions and added to the appropriate groups. Hopefully, these updates can be done directly to the SAM through OLE/ADSI.
· update the folder structure on the Departmental File Server. This may include create new share, move folders, change NTFS permissions etc.
There could be a "Update Flag" field to signify new or changed records which would be reset by the script once they are done.
There is a VB script ModifyUsers.vbs that comes with 2000 Resouce Kit that has a lot of lines that I am interested in. e.g. in the sub ModifyoneUser()
· Case "accountexpirationdate"
· If IsDate(strPropertyValueArray(i)) Then
· If DateDiff("d", now, CDate(strPropertyValueArray(i))) < 2 Then
· Print " Expiration date is too close."
· Else
· ********************** objUser.AccountExpirationDate = CDate(strPropertyValueArray(i))*********************
· Print " AccountExpirationDate = " & _
· CDate(strPropertyValueArray(i))
· End If
· Else
· Print " Warning: " & strPropertyValueArray(i) & _
· " is not a valid date."
· Print " The expiration date is not set."
· End If
The problem is that, though I did Pascal and Cobal years ago, I am rather new to KIX/VB/ADSI. So I don't quite know how to, for example, translate the above highlighted line into something like (I am probably totally wrong here):
OLECALLFUNC ($User, “SetValue”. “D”, $ExpirationDate)
I think if I can get hold of some info about the functionalities and usages of the Methods and names of the Objects (or the Object hierarchy) for SAM/ADSI/Excel, I should be able to come up with the scripts.
So, any info would be appreciated.
Ivan