I have the following problem:
When i run my LOGON_SCRIPT.vbs to add network shares to users of a specific group it skips the first one if the user is part of Kleinkunstig_Users (it will not add the first share). But if i add another group it will add the share of the first one and the other. Please help? (script is below)
'start script
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
'find user name
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
'find user group's
For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
' if user member of a group then map network drive
Select Case strGroupName
'
Case "Kleinkunstig_Users"
objNetwork.MapNetworkDrive "Y:", "\\KL01\Kleinkunstig"
Case "Kleinkunstig_Sales"
objNetwork.MapNetworkDrive "V:", "\\KL01\Sales"
Case "Kleinkunstig_Marketing"
objNetwork.MapNetworkDrive "M:", "\\KL01\Marketing"
Case "Kleinkunstig_Maanagement"
objNetwork.MapNetworkDrive "X:", "\\KL01\Management"
Case "Kleinkunstig_IT"
objNetwork.MapNetworkDrive "I:", "\\KL01\IT"
Case "Kleinkunstig_Financial"
objNetwork.MapNetworkDrive "O:", "\\KL01\Financial"
Case "Kleinkunstig_Administrator"
objNetwork.MapNetworkDrive "Q:", "\\KL01\Administrators"
'
End Select
Next
'end script