Discussion Locked

Group Login Scripts in Windows2000-AD

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to have an entire group login using a specific script. Is there any way I can use a single script and assign it to the Group object in AD?

TIA,

Bobby

5 replies

by mattius

In the resource kit for windows 2000 there is a program called "ifmember.exe" and can be used in login scripts to check if the user is a member of group. That should allow you to run specific commands on a group basis.

by joseph moore

Here is an answer to this I gave here on Feb 1:

You need the IFMEMBER.EXE tool from the Resource Kit. This tool, when used in a login script, will do what you want it to do. You can download IFMEMBER from the Microsoft web site here:
http://www.microsoft.com/windows2000/techinfo/reskit/too ls/new/ifmember-o.asp
(please remove any spaces)

And, you have to put IFMEMBER.EXE in the Netlogon share on your PDC and BDCs.

Now as for its use, here is an example:

ifmember "group1"
if errorlevel=1 goto group1
ifmember "group2"
if errorlevel=1 goto group2
ifmember "group3"
if errorlevel=1 goto group3
ifmember "group4"
if errorlevel=1 goto group4
EXIT

:Group1
net time \\nt01 /set /yes
net use g: \\nt01\app
net use h: \\nt01\soft
net use i: \\nt01\download
net use j: \\nt01\test
EXIT

:Group2
net time \\nt01 /set /yes
net use h: \\nt01\app
net use i: \\nt01\soft
EXIT

:Group3
net time \\nt01 /set /yes
net use h: \\nt01\soft
netuse i: \\nt01\download
net use j: \\nt01\test
EXIT

:Group4
net time \\nt01 /set /yes
net use i: \\nt01\download
EXIT

Hope this actually helps. I learned this trick on this very forum months ago.

This discussion is closed to new replies.