There could be a command line utility, but have you checked out Hyena http://www.systemtools.com
Main Topics
Browse All TopicsI need to get a quick listing of all the servers in our domain.
I was told that I could use DSGET to obtain this.
Can anyone give me the precise command line parameters to pull this data?
This should traverse many OU's within the AD. Here is the data I actually need:
1. Name of the server
2. Shares on each server
Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There could be a command line utility, but have you checked out Hyena http://www.systemtools.com
Simply open Active Directory users and computer in administrative tools.
or
start->run
dsa.msc
By default all domain controllers are under the folder domain controllers
To find other servers
Right click on the domain name and select find.
In the find drop down list select computers.
In the advanced tab click field
Select "operating system"
Select Ends with tin the condition drop down box
For value type "server 2003"
Then click find.
This will find all windows server 2003 computers in active directory
Do the same for "Server 2000" to get all windows server 2000 computers
download hyena, http://www.systemtools.com
In DOS command prompt type:
net view /domain:domainname > computer.csv
or try EnumServers.vbs (copy into notepad and save as EnumServers.vbs) scrpt:
' EnumServers.vbs
' VBScript program to enumerate all servers in the domain.
' Program enumerates the Distinguished Name of all computer objects that
' have the string "server" in the operating System attribute.
'
' You have a royalty-free right to use, modify, reproduce, and
' distribute this script file in any way you find useful, provided that
' you agree that the copyright owner above has no warranty, obligations,
' or liability for such use.
Option Explicit
Dim objRootDSE, strDNSDomain, objConnection, objCommand, strQuery
Dim objRecordSet, strComputerDN, strOS
' Determine DNS domain name from RootDSE object.
Set objRootDSE = GetObject("LDAP://RootDSE"
strDNSDomain = objRootDSE.Get("defaultNam
' Use ADO to search Active Directory for all computers.
Set objCommand = CreateObject("ADODB.Comman
Set objConnection = CreateObject("ADODB.Connec
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
objCommand.ActiveConnectio
strQuery = "<LDAP://" & strDNSDomain _
& ">;(objectCategory=compute
& "distinguishedName,operati
objCommand.CommandText = strQuery
objCommand.Properties("Pag
objCommand.Properties("Tim
objCommand.Properties("Cac
Set objRecordSet = objCommand.Execute
' Enumerate computer objects with server operating systems.
Do Until objRecordSet.EOF
strOS = objRecordSet.Fields("opera
If InStr(UCase(strOS), "SERVER") > 0 Then
strComputerDN = objRecordSet.Fields("disti
Wscript.Echo strComputerDN
End If
objRecordSet.MoveNext
Loop
' Clean up.
objConnection.Close
Set objRootDSE = Nothing
Set objCommand = Nothing
Set objConnection = Nothing
Set objRecordSet = Nothing
Wscript.Echo "Done"
I've been testing a new product called SpiceWorks which is free and does a pretty good job. http://www.spiceworks.com
Jeff
TechSoEasy
Business Accounts
Answer for Membership
by: stergiumPosted on 2006-08-07 at 08:46:02ID: 17264581
hello. i do not know the syntax for that command... but the information you need can be obtained through a security scanner like GFI languard. It is a really respectable tool.
try that instead :)