Link to home
Start Free TrialLog in
Avatar of FunkiNATEr
FunkiNATEr

asked on

IFMEMBER not showing all groups - HELP!

I am having trouble using the IFMEMBER utility for Windows Servers.  What I am trying to do, for example, is use a line like this in my script:

:TrusteeUser
ifmember domain\groupname
if not errorlevel 1 goto nextTrusteeUser
net use t: \\server\trustee$
:nextTrusteeUser

For some reason, though, ifmember is not seeing all of the group associations.  If I run "ifmember.exe /l /v" it will show only some of the groups I am associated with.  If I add myself to the trustee group and run the command again, for example, the trustee group does not appear.  

WHAT AM I DOING WRONG?  I have tried using:

1.  ifmember "groupname"
2.  ifmember groupname
3.  ifmember "domain\groupname"  and
4.  ifmember domain\groupname

and it still does not see the domain group membership.  Additionally, I have tried creating both a Domain Local group for this, and a Global security group... neither works.  

Any help will be greatly appreciated.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Quoted group name is all that should be necessary...

rem Check to see if allowed color printer access
ifmember "Color_LJ1"
if not errorlevel 1 goto skipcolor
rundll32 printui.dll,PrintUIEntry /dn /n\\wins_server\colorLJ1 /q
:skipcolor

http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/Resources/Documentation/windowsserv/2003/all/techref/en-us/ifmember.asp


-rich