Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

name list from user manager

Status
Not open for further replies.
Nov 25, 2002
33
MO
i need to do a docuement
one part of them is to drop down and record all the user account

however, every know that windows NT do not have the print function about the setting....

so any method to export all the information about the user list from the user manager??

100% thx ! Kill Ghost Prince
 
HI,

try this command to get the user list from user doamin,
net user /domain >c:\domainusers.txt


HTH


Aslam
 
Hi,

Here's a batch file that will give you a list of users along with the groups that they belong to. If
you want to save the output to a file for later printing, make the indicated changes....


::---------------------start of bat file -------------
::UserList.bat
::by Pat O'Brien
@echo off

set OutFile=UserList.txt
for /f "tokens=1-4" %%u in ('net user /domain') do call :ListUsers %%u %%v %%w %%x

echo DOS Rules!

goto :eof

:ListUsers

if not .%4.==.. goto :eof

for %%h in (%1 %2 %3) do Call :GroupDisplay %%h

goto :eof

:GroupDisplay

::when sending to file you may want to comment this line for speed purposes
net user /domain %1 1>nul 2>nul && (echo. & echo %1 & net user /domain %1 |find "*")

::uncomment this next line to have output go to "outfile" defined above
::net user /domain %1 1>nul 2>nul && (echo. >>%OutFile% & echo %1 >>%OutFile% & net user /domain %1
|find "*" >>%OutFile%)

goto :eof
::--------------------------------end of bat file--------



HTH

Aslam
 
cool!!!!

Really Thanks a lot

You both help me a lot, save me many times!! Kill Ghost Prince
 
Or there's always the addusers utility from the resource kit (one option gives you a csv file user report).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top