persistant drive mappings
- This topic has 2 replies, 2 voices, and was last updated 9 years, 8 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Home › Forums › Scripting › General Scripting › persistant drive mappings
hey guys what im trying to do is create persistant drive mappings for laptop users who VPN in …
here is my vbs script
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
Rem Default Mapping for all users
Rem objNetwork.MapNetworkDrive “G:”, “\serverdata”
Select Case strGroupName
Rem Map share1
Case “Share1”
objNetwork.MapNetworkDrive “q:”, “\servershare”
Rem Map share2
Case “share2”
objNetwork.MapNetworkDrive “r:”, “\servershare”
Rem MAP share3
Case “share3”
objNetwork.MapNetworkDrive “j:”, “\servershare”
Rem MAP share4
Case “share4”
objNetwork.MapNetworkDrive “n:”, “\servershare”
End Select
Next
Rem Quit the Script
wscript.quit
thanks guys
You must be logged in to reply to this topic.
Find out more about our cookie policy here.