Hi all,
I already setup a logon script to map users to certain drive if they are part of a certain group. However, I can't get 1 user to access 2 drives from 2 different department at the same time. Could you please help. Below is the script I've done:
***********
:departmenta
ifmember departmenta
if not errorlevel 1 goto departmentb
ECHO Mapping departmenta...
IF EXIST I:\NUL NET USE I: /DELETE > NUL
NET USE I: \\server\WORKGROUP\DEPARTMENTA /PERSISTENT:NO > NUL
goto NEXT
:departmentb
ifmember departmentb
if not errorlevel 1 goto departmentc
ECHO Mapping departmentb...
IF EXIST J:\NUL NET USE J: /DELETE > NUL
NET USE J: \\server\WORKGROUP\DEPARTMENTB /PERSISTENT:NO > NUL
goto NEXT
:departmentc
ifmember departmentc
if not errorlevel 1 goto NEXT
ECHO Mapping departmentc...
IF EXIST K:\NUL NET USE K: /DELETE > NUL
NET USE K: \\server\WORKGROUP\DEPARTMENTC /PERSISTENT:NO > NUL
goto NEXT
:NEXT
REM ***DEFAULT DRIVE MAPPINGS
net use g: /delete
net use g: \\servername\%clientname%
net use q: /delete
net use Q: \\servername\ivfpms
net use s: /delete
net use s: \\servername\workgroup\share
END
************
Question:
1) What additional command do I need to put in this script so that if I add the person to 2 different groups in Windows 2000 server, when they logon they would get both drive e.g. drive I and J, departmenta and departmentb, respectively.
Many thanks to those that help.
katchme!
I already setup a logon script to map users to certain drive if they are part of a certain group. However, I can't get 1 user to access 2 drives from 2 different department at the same time. Could you please help. Below is the script I've done:
***********
:departmenta
ifmember departmenta
if not errorlevel 1 goto departmentb
ECHO Mapping departmenta...
IF EXIST I:\NUL NET USE I: /DELETE > NUL
NET USE I: \\server\WORKGROUP\DEPARTMENTA /PERSISTENT:NO > NUL
goto NEXT
:departmentb
ifmember departmentb
if not errorlevel 1 goto departmentc
ECHO Mapping departmentb...
IF EXIST J:\NUL NET USE J: /DELETE > NUL
NET USE J: \\server\WORKGROUP\DEPARTMENTB /PERSISTENT:NO > NUL
goto NEXT
:departmentc
ifmember departmentc
if not errorlevel 1 goto NEXT
ECHO Mapping departmentc...
IF EXIST K:\NUL NET USE K: /DELETE > NUL
NET USE K: \\server\WORKGROUP\DEPARTMENTC /PERSISTENT:NO > NUL
goto NEXT
:NEXT
REM ***DEFAULT DRIVE MAPPINGS
net use g: /delete
net use g: \\servername\%clientname%
net use q: /delete
net use Q: \\servername\ivfpms
net use s: /delete
net use s: \\servername\workgroup\share
END
************
Question:
1) What additional command do I need to put in this script so that if I add the person to 2 different groups in Windows 2000 server, when they logon they would get both drive e.g. drive I and J, departmenta and departmentb, respectively.
Many thanks to those that help.
katchme!