Discussion Locked

Scripting

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
All I want to do is write/copy a script that would map specific printers & Drives to users based on what Active Directory Group the user is located in. I thought it would be easy, now I'm stumped. I can only use scripting languages that are inhearantly supported by Windows 2000. WSH, VBScript, ASDI, or WMI. I can't find a ASDI command to determine what user is logging in, if I could, I think I could use get beyond my block. Is this type of mapping possible? If so, how?

2 replies

by cptomlly

Are you trying to do this on Group Membership or OU container? If its feasible, OU container would be much easier, because you could set a GPO to run a simple batch at logon for the various user objects.

by tcolgrove

To get the logged on User:
>>Set WshADs = CreateObject("ADSystemInfo")
>>Set objUser = GetObject("LDAP://" & WshADs.UserName)

This will bind to the AD User object.

This discussion is closed to new replies.