serverbob
asked on
Windows 2008 VB logon script map drive by group membership
Hello,
I used a basic VB script I found on a microsoft site. The home directory part is working but the group membership mappings are not working. If anyone can tell me what Im doing wrong id appreciate it. Here is the script I used:
Const Finance_GROUP = "cn=SG_Finance"
Const IT_GROUP = "CN=SG_IT"
Set wshNetwork = CreateObject("WScript.Netw ork")
wshNetwork.MapNetworkDrive "h:","\\njfile\us$\" & wshNetwork.UserName
Set adSysInfo = CreateObject("ADSystemInfo ")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.Mem berOf))
If InStr(strGroups, finance_GROUP) Then
wshNetwork.MapNetworkDrive "J:","\\njfile\finance"
ElseIf InStr(strGroups, IT_GROUP) Then
wshNetwork.MapNetworkDrive "J:","\\njfile\it$\"
End If
I used a basic VB script I found on a microsoft site. The home directory part is working but the group membership mappings are not working. If anyone can tell me what Im doing wrong id appreciate it. Here is the script I used:
Const Finance_GROUP = "cn=SG_Finance"
Const IT_GROUP = "CN=SG_IT"
Set wshNetwork = CreateObject("WScript.Netw
wshNetwork.MapNetworkDrive
Set adSysInfo = CreateObject("ADSystemInfo
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.Mem
If InStr(strGroups, finance_GROUP) Then
wshNetwork.MapNetworkDrive
ElseIf InStr(strGroups, IT_GROUP) Then
wshNetwork.MapNetworkDrive
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER