Solved

NT4 Server Manager list into text file.

Posted on 2004-05-02
5
1,973 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 83

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 83

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 83

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now