Click to See Complete Forum and Search --> : Logon Script


TODD
06-05-2002, 10:50 AM
In a Windows 2000 Domain, is there a command to have a logon script check to see if a user is a member of a group and if so map a network drve.



Thanks,

tim
06-05-2002, 01:02 PM
showgrps|grep -i GROUPNAME
if %errorlevel% 0 net use d: \SERVERSHARE

showgrps and grep are RK tools.

Kixtart also has tools to check groups and map drives.


------------
TODD at 6/5/2002 11:50:22 AM


In a Windows 2000 Domain, is there a command to have a logon script check to see if a user is a member of a group and if so map a network drve.



Thanks,

Matt
06-07-2002, 05:31 AM
You can use IfMember.exe as well.

ifmember "domain admins"
if errorlevel 1 goto member
if errorlevel 0 exit

errorlevel returns the number of groups that the user is a member of. in the aboe example. 1 means they are a memeber, 0 means they are not.

just place ifmember.exe in the same folder as the logon batchfiles and it'll work

cheers

matt


------------
tim at 6/5/2002 2:02:00 PM

showgrps|grep -i GROUPNAME
if %errorlevel% 0 net use d: \SERVERSHARE

showgrps and grep are RK tools.

Kixtart also has tools to check groups and map drives.


------------
TODD at 6/5/2002 11:50:22 AM


In a Windows 2000 Domain, is there a command to have a logon script check to see if a user is a member of a group and if so map a network drve.



Thanks,

Matt
06-07-2002, 05:31 AM
You can use IfMemeber.exe as well.

ifmember "domain admins"
if errorlevel 1 goto member
if errorlevel 0 exit

errorlevel returns the number of groups that the user is a member of. in the aboe example. 1 means they are a memeber, 0 means they are not.

just place ifmember.exe in the same folder as the logon batchfiles and it'll work

cheers

matt


------------
tim at 6/5/2002 2:02:00 PM

showgrps|grep -i GROUPNAME
if %errorlevel% 0 net use d: \SERVERSHARE

showgrps and grep are RK tools.

Kixtart also has tools to check groups and map drives.


------------
TODD at 6/5/2002 11:50:22 AM


In a Windows 2000 Domain, is there a command to have a logon script check to see if a user is a member of a group and if so map a network drve.



Thanks,