Try this...
ifmember "Domain\Domain Admins"
if not %errorlevel% EQU 1 goto EndDomainAdmins
echo Now mapping Z for the Domain Admins group..
net use z: \\servername-fs03\data
:EndDomainAdmins
Main Topics
Browse All TopicsHello,
I really appreciate anyones help on this, i was able to create a login script in notepad as a batch file and test it for user's personal home fodlers and shared folders. but im having huge issue with assigning groups to their groups folder, i know you can't do that in notepad as a batch file without using ifmember.exe. My problem is Idont know how to work ifmember.exe. i installed and copied the ifmember executable to the same path that the script is located in my PDC. as required, and thought i enter the right commands but when i run it nothing happens, just my original commands works. Not the ifmember. Please help
here is a copy of my test.bat file
REM *** Login Script for Company Users ***
net use i: /delete
net use g: /delete
net use h: /delete
net use m: /delete
net use n: /delete
net use g: \\servername-fs03\prog
net use h: \\servername-fs03\data
net use i: \\servername-fs02\%usernam
net use m: \\servername-fs03\data
net use n: \\servername-fs01\apps
ifmember DomainAdmins
if not errorlevel 1 goto EndDomainAdmins
net use z: \\servername-fs03\data
:EndDomainAdmins
REM call \\empire-dc01\netlogon\acc
REM call \\empire-dc01\netlogon\acc
--------------------------
after running this the only drives that gets mapped are the G,H,I,M,N no Z drive which is the ifmember command.
Thank you
Eddie
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sirbountyPosted on 2007-01-16 at 13:11:27ID: 18327556
This should read:
ifmember "Domain\Domain Admins"
where Domain is your domain name...