Hi...the following script will map the first drive ONLY, the second statement does not map. We have 2x checked the Group Membership and share access. (able to map using Windows Explorer.
NOt sure at this point why the second drive is not mapping?!?!
any help would be awesome!

' CAS-GrpMapDrive.vbs
' Script Maps network drive based on group members ship for a user and it is paplied to entire domain.
' ------------------------------------------------------------------------------------------------------'
Option Explicit
' On Error Resume Next
Dim objNetwork, objUser, CurrentUser
Dim strGroup
' Initialise any existing or new secuirty group that will need custom drive mapping
' [Copy and paste the existing line and then change the group name on both side of "=" sign]
Const Appeals = "cn=Appeals"
Const Modernization = "cn=Modernization"
' Create objects and extract strGroup values
' DO NO MAKE ANY CHANGES HERE
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = LCase(Join(CurrentUser.MemberOf))
' Para 1
' P: Drive for Appeals Group
If InStr(strGroup, lcase(Appeals)) Then
WScript.Echo "Appeals: " & strGroup
objNetwork.MapNetworkDrive "p:", "\\tcc-usersdata\appeals"
' Para 2
' P: Drive for Modernization Group
ElseIf InStr(strGroup, lcase(Modernization)) Then
WScript.Echo "Modernization: " & strGroup
objNetwork.MapNetworkDrive "h:", "\\tcc-usersdata\Modernization"
' If you like to add more Group based mappping, all you have to do is copy the contents of "Para 2"
' and modify the group and Network drive mapping
End If
WScript.Quit
' End of example VBScript .
NOt sure at this point why the second drive is not mapping?!?!
any help would be awesome!
' CAS-GrpMapDrive.vbs
' Script Maps network drive based on group members ship for a user and it is paplied to entire domain.
' ------------------------------------------------------------------------------------------------------'
Option Explicit
' On Error Resume Next
Dim objNetwork, objUser, CurrentUser
Dim strGroup
' Initialise any existing or new secuirty group that will need custom drive mapping
' [Copy and paste the existing line and then change the group name on both side of "=" sign]
Const Appeals = "cn=Appeals"
Const Modernization = "cn=Modernization"
' Create objects and extract strGroup values
' DO NO MAKE ANY CHANGES HERE
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = LCase(Join(CurrentUser.MemberOf))
' Para 1
' P: Drive for Appeals Group
If InStr(strGroup, lcase(Appeals)) Then
WScript.Echo "Appeals: " & strGroup
objNetwork.MapNetworkDrive "p:", "\\tcc-usersdata\appeals"
' Para 2
' P: Drive for Modernization Group
ElseIf InStr(strGroup, lcase(Modernization)) Then
WScript.Echo "Modernization: " & strGroup
objNetwork.MapNetworkDrive "h:", "\\tcc-usersdata\Modernization"
' If you like to add more Group based mappping, all you have to do is copy the contents of "Para 2"
' and modify the group and Network drive mapping
End If
WScript.Quit
' End of example VBScript .