B
brian
My objective is to map a drive for users of a specific
group in Active Directory. The drive should only be
mapped under terminal services sessions.
The usrlogon.cmd currently calls a script (e.g.
logon1.bat) on our domain controller and that works fine.
I've modified a VBS supplied by Microsoft (below). I've
attempted to call this script (e.g. call script1.vbs)
within the usrlogon.cmd file and logon1.bat file but it
doesn't appear to be executing.
Const Test_Group = "cn=TestGroup1"
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" &
ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, Test_Group) Then
wshNetwork.MapNetworkDrive "i:", "\\servername\share"
End If
Any help greatly appreciated.
B
email: blilly(removethispart)@crh.com
group in Active Directory. The drive should only be
mapped under terminal services sessions.
The usrlogon.cmd currently calls a script (e.g.
logon1.bat) on our domain controller and that works fine.
I've modified a VBS supplied by Microsoft (below). I've
attempted to call this script (e.g. call script1.vbs)
within the usrlogon.cmd file and logon1.bat file but it
doesn't appear to be executing.
Const Test_Group = "cn=TestGroup1"
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" &
ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, Test_Group) Then
wshNetwork.MapNetworkDrive "i:", "\\servername\share"
End If
Any help greatly appreciated.
B
email: blilly(removethispart)@crh.com