how to export user from a usersgroup

Hi I have some local groups on my webserver and each group contains number of users in it.I would like to know is there any way I can export all the users in one group to a text file.
bhanukbmAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oBdACommented:
"net.exe localgroup <groupname>" will do this for you, if you redirect the output.
The problem is that there are lots of unneeded lines included; to get rid of those, it takes a bit more.
Just give this the name aof your group as an argument, and it will produce the same output as "net localgroup", only with header and trailer stripped.

====8<----[exportlg.cmd]---------------------------------
@echo off
setlocal

set Enable=FALSE
if %1.==. goto leave

for /f "tokens=*" %%a in ('net localgroup') do set CommandCompleted=%%a

for /f "tokens=*" %%a in ('net localgroup %1') do call :process %%a
goto leave

:process
if "%1"=="-------------------------------------------------------------------------------" (
 set Enable=TRUE
 goto :eof
)
if /i %Enable%==FALSE goto :eof

if not "%*"=="%CommandCompleted%" echo %*
goto :eof

:leave
====8<----[exportlg.cmd]---------------------------------
bhanukbmAuthor Commented:
Thanks for the answer oBDA. I am a  developer and don't have full access to my production server. But I can see the users in the local groups of my production server through MMC from my windows 2000 professional desktop.
So is there any way that I can run some utilty from my machine to get all the users from the local groups of production box. Sorry for not being clear in my first question.
 
Obi_WannabeCommented:
There is a tool in the resource kit that should do it called LOCAL

Displays members of local groups on remote servers or domains.

LOCAL group_name domain_name | \\server

  group_name    The name of the local group to list the members of.
  domain_name   The name of a network domain.
  \\server      The name of a network server.

Examples:
  Local "Power Users" EastCoast
  Displays the members of the group 'Power Users' in the EastCoast domain.

  Local Administrators \\BLACKCAT
  Displays the members of the group Administrators on server BLACKCAT.

Notes:
  Names that include space characters must be enclosed in double quotes.
  To list members of global groups use Global.Exe.
  To get the Server name for a give Domain use GetDC.Exe.

To put the output into a text file do this:

LOCAL GROUPNAME \\SERVERNAME>>users.txt

Hope that helps. Let me know if you need that tool if you don't have the resource kit...I can e-mail it to you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bhanukbmAuthor Commented:
Please send me this tool. My email is kandulabhanu@yahoo.com
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.