Solved

NT4 Server Manager list into text file.

Posted on 2004-05-02
5
2,006 Views
Last Modified: 2013-12-19
how can i export the list of my nt4 PDC server manager into a text file or a CSV file? please it's very important and urgent to me.

Daniel.
0
Comment
Question by:tomerlei
  • 3
  • 2
5 Comments
 
LVL 84

Expert Comment

by:oBdA
ID: 10972507
Use this script to obtain a list of your domain machines, and add ">Machine.txt" at the end of the command; if necessary, adjust the settings at the beginning to your localized version of NT:

====8<----[ListMachines.cmd]----
@echo off
setlocal
:: *** The name of your domain user group:
set DomainUsers=Domain Users
:: *** The number of the first useless lines of the 'net group "domain users" /domain' command output:
set NetFirst=4
:: *** The last line of the 'net group "domain users" /domain' command output:
set NetLast=The command completed successfully

echo Computeraccounts in %Userdomain%:
for /f "skip=%NetFirst% delims=" %%a in ('net group "%DomainUsers%" /domain') do (
 set Line=%%a
 call :process
)
goto leave

:process
:: *** Get the account names, configured in three columns:
set Account1=%Line:~0,25%
set Account2=%Line:~25,25%
set Account3=%Line:~50,25%
:: *** Avoid processing the "The command completed successfully" line
if /i "%Account1%"=="%NetLast:~0,25%" goto :eof
:: *** Remove spaces
if not "%Account1%"=="" set Account1=%Account1: =%
if not "%Account2%"=="" set Account2=%Account2: =%
if not "%Account3%"=="" set Account3=%Account3: =%
:: *** Write all accounts containing a "$":
if "%Account1%"=="" goto :eof
if not "%Account1%"=="%Account1:$=%" echo %Account1%
if "%Account2%"=="" goto :eof
if not "%Account2%"=="%Account2:$=%" echo %Account2%
if "%Account3%"=="" goto :eof
if not "%Account3%"=="%Account3:$=%" echo %Account3%
goto :eof

:leave
====8<----[ListMachines.cmd]----
0
 
LVL 4

Author Comment

by:tomerlei
ID: 10974886
the script you gave me didn't really work, and from what i got
the command "net group" gives you the status of group in the domain, not the computer accounts, i need the list of the computer accounts that you see on the server manager, not in the user manager.

Thanks in advance,
Daniel Leicht.
0
 
LVL 84

Expert Comment

by:oBdA
ID: 10975390
The command
net group "domain users" /domain
will give you a list of all your domain accounts (assuming that your domain users groups is called "Domain Users"). That includes the computer accounts, which have a "$" at the end of the name. What happens if you enter this in a command window?
0
 
LVL 4

Author Comment

by:tomerlei
ID: 10975878
oh, you were right i accidently thought you ment for the domain name to be there, but still it doesn't give me the computer type (OS) which the server manager gives me.
can you help me with that?
thanks in advance,
Daniel Leicht.
0
 
LVL 84

Accepted Solution

by:
oBdA earned 50 total points
ID: 10977840
For remote checking of the OS version, you can use PsInfo from Sysinternals (http://www.sysinternals.com/ntw2k/freeware/psinfo.shtml).
You can first export the machine list to a text file, then use
for /f %%a in ('type "YourMachines.txt"') do @psinfo.exe \\%a
to get a complete list of machine configurations.
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question