HI all,
I am trying to simplify my login scripts using the ifmember.exe application. I have set up a whole load of groups in AD and the idea of the login script is that it checks to see if the user is part of the group, if he/she is then they get a drive mapped.
The thing is, people can be members of multiple groups and I can't get the script working this way!
@echo off
:it
ifmember.exe "IT Group"
if not errorlevel 1 goto finance
net use l: "\\server1\IT"
:finance
ifmember.exe finance
if not errorlevel 1 goto licence
net use g: \\server1\finance
:licence
ifmember.exe Licencedrive
net use f: \\server1\License
:quit
Hmm, any ideas how I should be doing this script?
Thanks
I am trying to simplify my login scripts using the ifmember.exe application. I have set up a whole load of groups in AD and the idea of the login script is that it checks to see if the user is part of the group, if he/she is then they get a drive mapped.
The thing is, people can be members of multiple groups and I can't get the script working this way!
@echo off
:it
ifmember.exe "IT Group"
if not errorlevel 1 goto finance
net use l: "\\server1\IT"
:finance
ifmember.exe finance
if not errorlevel 1 goto licence
net use g: \\server1\finance
:licence
ifmember.exe Licencedrive
net use f: \\server1\License
:quit
Hmm, any ideas how I should be doing this script?
Thanks