Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Count Computers on Network?

Posted on 2012-03-28
4
Medium Priority
?
350 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 500 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 500 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 500 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 500 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I was at a customer and we recently set up a new DNS Server.  I asked him to ensure that all servers pointed to the new server.  140 remote servers – estimated 6 days of work to do this manually. Ever had this experience and just need to get the …
Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

721 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