Count Computers on Network?

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.
LVL 4
Pancake_EffectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pclinuxguruCommented:
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.
aitgCommented:
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.
john MCommented:
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
Khandakar Ashfaqur RahmanExpert/ConsultantCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Management

From novice to tech pro — start learning today.