Solved

Are there any commadsto list all computers in one domain?

Posted on 2010-11-10
6
333 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

777 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