Solved

Count Computers on Network?

Posted on 2012-03-28
4
348 Views
Last Modified: 2012-04-12
I have to get a count of how many computers are at our facility. I'm hoping for a easier way other than physically walking and counting each one here.

Q1:Is there a way to count how many computers is on the network?

If possible

Q1 Part 2: Is there a way to count also the computers not on the network along with it? (meaning counting workgroups)
If not just having the ones on the network will cut a lot of time down in counting them all.

If it helps any we have SBS 2011, and a Cisco ASA 5510.
0
Comment
Question by:Pancake_Effect
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Assisted Solution

by:pclinuxguru
pclinuxguru earned 125 total points
ID: 37778013
Fast and furious way is to count your DHCP leases. Subtract the ones you know aren't machines.

If you not in a hurry you could setup a spiceworks (www.spiceworks.com) server and let it run for a week or so and it should give you an accurate count. I say let it run for a week or so for the machines that are turned off or laptops.
0
 

Assisted Solution

by:aitg
aitg earned 125 total points
ID: 37778225
You can use the arp -a command to report all devices in the arp table, but that would not distinguish computers from other networked devices. If you want a definitive list of networked devices, with graphical output, you can download jNetMap.
0
 
LVL 3

Assisted Solution

by:john M
john M earned 125 total points
ID: 37778461
here is now to do it in .net
i use this to read all the event logs on our network

Imports System.Data
Imports System.Net.NetworkInformation
Imports System.Runtime.InteropServices
Imports System.IO.File
Imports System.Configuration
Imports Registration.Exams
Imports System.Data.SqlClient
Imports System
Imports System.IO
Imports System.Xml
Imports Microsoft.VisualBasic
Imports System.Net
Imports System.Web

Imports System.Net.Sockets
Imports System.Text.RegularExpressions
#Region "Get network computers"
    Public Function GetNetworkComputers() As ArrayList
        Dim networkComputers As New ArrayList()
        Const MAX_PREFERRED_LENGTH As Integer = -1
        Dim SV_TYPE_WORKSTATION As Integer = 1
        Dim SV_TYPE_SERVER As Integer = 2
        Dim buffer As IntPtr = IntPtr.Zero
        Dim tmpBuffer As IntPtr = IntPtr.Zero

        Dim entriesRead As Integer = 0
        Dim totalEntries As Integer = 0
        Dim resHandle As Integer = 0
        Dim sizeofINFO As Integer = Marshal.SizeOf(GetType(_SERVER_INFO_100))

        Try
            Dim ret As Integer = NetServerEnum(Nothing, 100, buffer, MAX_PREFERRED_LENGTH, entriesRead, totalEntries, _
                                               SV_TYPE_WORKSTATION Or SV_TYPE_SERVER, Nothing, resHandle)

            If ret = 0 Then
                For i As Integer = 0 To totalEntries
                    tmpBuffer = New IntPtr(CType(buffer, Integer) + (i * sizeofINFO))
                    Dim svrInfo As _SERVER_INFO_100 = CType(Marshal.PtrToStructure(tmpBuffer, _
                                                            GetType(_SERVER_INFO_100)), _SERVER_INFO_100)
                    ' If svrInfo.sv100_name.Substring(0, 1) <> "A THRU Z" Then
                    'If (svrInfo.sv100_name.Substring(0, 10)) = "DANB-HOMER" Then
                    '    networkComputers.Add(svrInfo.sv100_name)
                    'Else


                    If svrInfo.sv100_name.Length < 4 And svrInfo.sv100_platform_id = "400" Then
                        networkComputers.Add(svrInfo.sv100_name)
                    Else
                        If (svrInfo.sv100_platform_id = "400") Then
                            networkComputers.Add(svrInfo.sv100_name)
                            'End If

                        End If
                    End If
                    ' If (svrInfo.sv100_name.Substring(0, 10)) = "DANB-HOMER" Then
                    'networkComputers.Add(svrInfo.sv100_name)
                    'End If
                Next
            End If
        Catch ex As Exception
            Console.WriteLine("Error getting network computers.")
        Finally
            NetApiBufferFree(buffer)
        End Try

        Return networkComputers
    End Function
#End Region

    ' Example Usage
    Public Sub getall()
        Dim networkComps As ArrayList = GetNetworkComputers()
        For Each Str As String In networkComps
            MsgBox(Str)
        Next

        'Next
    End Sub
0
 
LVL 11

Accepted Solution

by:
Khandakar Ashfaqur Rahman earned 125 total points
ID: 37781357
arp -a command will only show those physical addresses which are already resolved.If any host has ICMP reply disabled by firewall can't be shown into ARP cache.

Most of the tools are ICMP based.If you ICMP scan into your network it might not be correct because some machines won't reply if ICMP is blocked by firewall.

However, I'd request you to use NMAP:
http://nmap.org/dist/nmap-5.51-setup.exe

If your network is 192.168.0.0/24 then:

Target: 192.168.0.0/24
Profile: Intense Scan No ping

You also can choose Intense Scan to determine about OS and device type and open ports.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
Is your computer hacked? learn how to detect and delete malware in your PC
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

751 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