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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
J0K0
ASKER
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