group member script 
Author Message
 group member script

Iam trying to
write a login script that will check to see if a user is
a member of a group, and if he is, it will map a network
drive for him.  I know how to make the script map a
drive, but I can not find a command to check is a user is
a member of a group.  I am pritty ure it would be
something like

If %doman\user% is member of \\doman\group goto MAP
:MAP
Net use U: \\mapname\folder

NOTE:  is member of does not work.  This is whe command I
am trying to find.

The OS is Windows 2000.
Any Ideas?
Thanks



Mon, 26 Apr 2004 01:22:58 GMT  
 group member script
Tip: You can use http://groups.google.com/advanced_group_search to search in a
news database having articles dated back to all the way to 1995.

Fill in *scripting in the Newsgroup field to narrow down the search to the
scripting groups only.

Using batch files:

*************************************
http://www.jsiinc.com Tip 0287
Test for group membership.
Somar's (tm) Testgrp (http://www.jsiinc.com/dl/testgrp.zip) is a freeware
Windows NT console utility that can be used to test for group membership in
logon scripts. For example:

    testgrp "domain admins"
    if errorlevel 1 goto skip
    call domadmin.bat
    :skip

If you have Windows 95 clients, see tip 120.
*************************************

*************************************

Subject: Re: How to find out id a group is a member of another group?
Newsgroups: microsoft.public.scripting.wsh
Date: 2001-02-09 06:53:42 PST

I am guessing that IsMember function you mentioned is actually
NTServer Resource Kit's ifmember.exe utility.

Piece of batch file (logon script) that tests for
membership in local Admin group:

ifmember Administrators
if not errorlevel 1 goto QUIT

 ...

:QUIT
exit

Domain group testing:
ifmember MyDomain\Domain Users
*************************************

Using VBScript:

For examples on determing group membership, do this Google newsgroup search
(line may wrap!)
http://groups.google.com/advanced_group_search?q=Group+Membership++De...

And as Clarence that runs the Web site Win32Scripting says it: "My site has TONS
of vbscript logon scripts to learn from."

http://cwashington.netreach.net

I think several of them gives examples testing group membership to map drives
and install printers and so on.

--
torgeir

Quote:

> Iam trying to
> write a login script that will check to see if a user is
> a member of a group, and if he is, it will map a network
> drive for him.  I know how to make the script map a
> drive, but I can not find a command to check is a user is
> a member of a group.  I am pritty ure it would be
> something like

> If %doman\user% is member of \\doman\group goto MAP
> :MAP
> Net use U: \\mapname\folder

> NOTE:  is member of does not work.  This is whe command I
> am trying to find.

> The OS is Windows 2000.
> Any Ideas?
> Thanks



Tue, 27 Apr 2004 12:11:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Enumerate Local Group Members and Identify Domain of Members

2. How do I add a domain global-groups in a member-server local group

3. Enumerating Members of a Local Group (Not on a DC)

4. Use ADSI to get the groups of a member

5. Find each group a user is a member of

6. How to List All Groups and Members

7. If member of a group then map network drive

8. Enumerate Global Group Members from Remote, Non-Admin?

9. groups and members

10. Make drive mapping when member of group

11. Enumerate Local Groups a user is a member of from a different domain

12. Finding group member

 

 
Powered by phpBB® Forum Software