Link to home
Start Free TrialLog in
Avatar of josefkocarek
josefkocarek

asked on

Scripting problem ifmember

I created global group test_global and populated it with administrator user, than i created local group test_local and I populated this group with test_global. Ifmember.exe is in netlogon share.
I created share called test .

I created login script and placed it in netlogon share as login.bat.

This is the script....
net use * /delete /yes

:test_local
ifmember test_local
if not errorlevel 1 goto next
echo Connecting to test_local...
net use r: \\server\test /yes >nul

:next

:end


When I remove the administrator from test_global I am still getting the maped drive (r) connection. It seams that the ifmember is not working.
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
Avatar of josefkocarek
josefkocarek

ASKER

Yes I have logoff.
I have used the /list option in cmd mode. I have navigated to the netlogon dir, where my logon.bat and the ifmember.exe is.
I have run ifmember /list and it doesn't show the membership in the test_local group.
What can be wrong?
I will try your script with /list and pause
It is interesting that I don't have any problems running the script from user profile. The problem starts when I am using group policy. Why??
J0K0