Title: RE: [ActiveDir] OT: WMI to retrieve DHCP leases
Another tack to take is to use something like NMAP. It's a very effective IP discovery tool. I suppose it all depends on what you mean by "out there".
 
Counting objects in AD will tell you the computers have been joined to the domain at some point. They might or might not exist anymore, and if they exist, they might not be in use.
 
Counting DHCP leases will tell you the computers that use DHCP and are on a subnet covered by a DHCP scope. It won't tell you anything about computers with static addresses, or computers whose lease has expired. And you have to know where all your DHCP servers (they might be routers or switches or WAPs (!), and not Windows servers). And some of the leases may be for printers and copiers and such, which might not fit your definition of a computer.
 
Using NMAP will tell you all the devices that are reachable on the subnets you specify, are turned on, and have a loaded IP stack. The nice thing about NMAP is that it will tell you what kind of a device it is, what OS is loaded, and what services are running on it. It won't tell you anything about devices that aren't turned on.
 
None of these schemes will tell you about standalone computers not on the network. Would you consider a non-networked computer "out there"?
 
Some combination of the three (with appropriate duplicate removal) could give you a very accurate count.
 
-gil
 

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond
Sent: Thursday, January 26, 2006 7:14 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] OT: WMI to retrieve DHCP leases

DHCP is a much better metric than computers joined to the domain for this. You can't count non-domain-joined devices with any AD tool. Chances are however these devices have a DHCP lease.
 
Thanks,
Brian Desmond
[EMAIL PROTECTED]
 
c - 312.731.3132


From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Thu 1/26/2006 8:05 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] OT: WMI to retrieve DHCP leases

DHCP is NOT the authoritative source for "how many computers are out there"

If you could, grab Joe's oldcomp tool and just run it against your domain.
You should get something close to accurate from there.


Sincerely,

Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday?  -anon

________________________________

From: [EMAIL PROTECTED] on behalf of Mitch Reid
Sent: Thu 1/26/2006 12:55 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] OT: WMI to retrieve DHCP leases


No, I need to get a count of how many computers are out there.  I'm lacking a
good authoritative source and want to use the DHCP servers as a count.

My script works that runs NETSH (for each scope on each server) but I like to
keep everything in VB/WMI when possible.

Thanks for the replies.


On 1/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

        To the OP:
       
        Would you be happy with pulling the info on the client side? You
could use
        Win32_NetworkAdapterConfiguration and retrieve the DHCPLeaseObtained
or
        DHCPLeaseExpire values.
       
        <back to my rabiit hole, folks :)>
       
        Sincerely,
       
        Dèjì Akómöláfé, MCSE+M MCSA+M MCT
        Microsoft MVP - Directory Services
        www.readymaids.com - we know IT
        www.akomolafe.com
        Do you now realize that Today is the Tomorrow you were worried about
        Yesterday?  -anon
       
        ________________________________
       
        From: [EMAIL PROTECTED] on behalf of Alain Lissoir
        Sent: Wed 1/25/2006 6:45 PM
        To: ActiveDir@mail.activedir.org
        Subject: RE: [ActiveDir] OT: WMI to retrieve DHCP leases
       
       
        There is no WMI exposure of the DHCP settings and data. Sorry.
       
        ________________________________
       
        From: [EMAIL PROTECTED]
        [mailto:[EMAIL PROTECTED]] On Behalf Of Mitch Reid
        Sent: Wednesday, January 25, 2006 1:08 PM
        To: ActiveDir.Org
        Subject: [ActiveDir] OT: WMI to retrieve DHCP leases
       
       
        I'm trying to write a _vbscript_ to pull current DHCP leases from a
2003 DHCP
        server.
        I can do it with NETSH but I'd like to do it only with WMI in VBS.
       
        The closest I could find was dhcpobj.dll from the 2000 Resource Kit.
However
        it doesn't
        appear to be able to pull leases.
       
        Is this possible?
       
        Thanks, Mitch.
       
        List info   : http://www.activedir.org/List.aspx
        List FAQ    : http://www.activedir.org/ListFAQ.aspx
        List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
       


List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to