hello,
i'm in need of help with my vbscript.
i want to use it to map a drive to the users in a curtain group in AD by implementing it in group policy.
however i'm not sure if it works correctly.
the script:
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
Select Case strGroupName
Case "testgroep"
objNetwork.MapNetworkDrive "R:", "\\TOM-TELLIE\SOFTLIB"
End Select
Next
can any of you see what's wrong with it.
thanks
i'm in need of help with my vbscript.
i want to use it to map a drive to the users in a curtain group in AD by implementing it in group policy.
however i'm not sure if it works correctly.
the script:
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")
strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
Select Case strGroupName
Case "testgroep"
objNetwork.MapNetworkDrive "R:", "\\TOM-TELLIE\SOFTLIB"
End Select
Next
can any of you see what's wrong with it.
thanks