Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Mapping custom network drives and using AD groups

$
0
0

I'm trying to write a script that maps users to custom drive mappings (mapping not assigned in AD) and pull drives from AD. As of now I can achieve my goal but the problem is when a user doesn't have a custom drive mapping, I cannot call my other script that calls for the AD mappings. Do I need an ELSE statement that continues the USERNAME into the MYBYGROUP. Example below:

REM: Remove local Drives
net use * /d /y

:: Reconnect Universal drives
net use M: USERDRIVE

net use Y: COMMONDRIVE

SET USERDIR=%username%

GOTO %USERDIR%

:USERNAME
net use F: CUSTOMDRIVE
GOTO MAPBYGROUP

:MAPBYGROUP

wscript %0\..\logon.vbs

Exit


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>