Solved

Are there any commadsto list all computers in one domain?

Posted on 2010-11-10
6
334 Views
Last Modified: 2012-06-21
Usually we can use "net view ..." to list all on-line computers in a domain.
For this domain, it seems to have a strict rule in place. When I issue the same command, I got "System error 6118 has occurred. This workgroup is not currently available..."
However ping the other computer OK and we can copy/share files by making a shared point without problem. Do you know what kind of privileges are needed to make it work? Any other commands list all the computers in a domain? Thanks a lot.  
0
Comment
Question by:jl66
6 Comments
 
LVL 10

Assisted Solution

by:Tyler Laczko
Tyler Laczko earned 40 total points
ID: 34105418
it seems that your computer is not part of a domain.

you can log into your server and look at DHCP
0
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 400 total points
ID: 34105719
I'm pretty sure your computer has to be part of the domain for this to work, but  you can try using LDAP and active directory.  Here is a site with some decent scripts:

http://www.activexperts.com/activmonitor/windowsmanagement/scripts/activedirectory/computer/

I modified this one and ran it and it is listing all the computers.  From a command prompt, run it as
c:\>cscript name.vbs

where name.vbs is the name of the script file on your local drive.



Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =   CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
    "Select Name, Location from 'LDAP://DC=firmwide,DC=corp,DC=gs,DC=com' " & "Where objectClass='computer'"  
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst

Do Until objRecordSet.EOF
    wscript.stdout.write "Computer Name: " & objRecordSet.Fields("Name").Value & " "
    wscript.stdout.writeline "Location: " & objRecordSet.Fields("Location").Value
    objRecordSet.MoveNext
Loop

Open in new window

0
 

Author Comment

by:jl66
ID: 34106018
Thanks for the info and tips.
Dan7el: FOr "DC=firmwide,DC=corp,DC=gs,DC=com", how to determine these values?
Per instruction I ran it and got some error:
..."(13, 1) Provider: Table does not exist."
which is "Set objRecordSet = objCommand.Execute"
Thanks in advance!
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 20

Expert Comment

by:Daniel Van Der Werken
ID: 34106270
You'll have to set that to your specific domain.
In this instance, you'll use whatever your domain is.   For example, if you were at microsoft.com, then you'd use
DC=Microsoft,DC=com
0
 
LVL 8

Assisted Solution

by:RGRodgers
RGRodgers earned 60 total points
ID: 34107767
Have you looked into Microsoft's Sysinternals?  The ADexplorer can provide the list under DC=domain.com,CN=Computers.  The whole Sysinternals package is a free Microsoft download.
0
 

Author Closing Comment

by:jl66
ID: 34117308
Thank all of you so much.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 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