using WMI for computer inventory

  • Thread starter Cary Shultz [A.D. MVP]
  • Start date
C

Cary Shultz [A.D. MVP]

Good afternoon, all!

Simple question for the WMI experts: is there any problem using WMI in a
medium-sized environment for doing a computer inventory? Medium-sized
meaning around 2000 computers? Also have a potential 300 computer
environment. I will be using a simple HTA right now but want to get more
into actually creating an application to do this ( that will come later ).

I am asking because some people in the news groups have mentioned that they
like to stay away from WMI because it is "too clunky". Network
connectivity should not really be a problem ( all 10/100 with excellent
switches ). Just going to be doing the 'usual' stuff - mobo, NIC, VGA,
Audio, CPU, HDD, etc. Software is not going to be included - that might
come later, though.

Thank you all!

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
S

Scott McNairy \(MVP\)

No problem doing this at all. It is one of the principal functions of WMI.

The Microsoft MOM product does this... So does SMS to a lesser extent.
People have written custom scripts or applications to do this as well.
Logon scripts set in Active Directory is a common approach.
 
C

Cary Shultz [A.D. MVP]

Scott,

Thank you for the reply. I am going to be one of those people creating both
the custom script ( most likely an HTA... ) and then later the application
that will do this ( there are several apps that I have downloaded right now
that I am examining to see what they do and what they do not do so that I
can take the good from all of them and avoid missing anything...if that is
possible ).

My concern was that in a larger environment that WMI is too clunky ( read:
bloated ). Someone whose opinion I respect says that he always tries to
find another way to do the things that WMI does....especially in larger
environments. Since I am pretty new to both WMI and ADSI I wanted to check
with the pros.....

It might take a while to "get 'r done" but I am looking forward to this. I
remember all too well the struggle it was to inventory the 300 computers
'where I used to work' ( manually, of course! ) some three+ years ago.
Would not like to ever do that again! It is truly one of the most loathed
jobs in IT.

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
B

Branimir Petrovic

Cary Shultz [A.D. MVP] wrote:

My concern was that in a larger environment that WMI is too clunky ( read:
bloated ). Someone whose opinion I respect says that he always tries to
find another way to do the things that WMI does....especially in larger
environments.

Bloatedness should not be your main worry, but reliability. In my experience
whenever you are dealing with *many* system - WMI invariably becomes pain in
the ... Some (of many) systems will have problems with WMI (most trivial
being disabled DCOM), and you will find occasional system where attempt to
instantiate remote WMI object hangs and that would be the "kiss of death"
if your app is single threaded script app (if script application is what you
have on mind). Then you'll have to come to terms with local firewalls...

Put these two together and the best defense would be to design/make your app
as local service running on each and every PC you want to work with and have
that local service "call the mother ship" (web site front end to central
database?). And all of sudden your little project idea becomes huge and
complex application. May be paying for MS SMS or IBM Tivoli aint't such a
bad idea after all ;)

Branimir
 
J

James Crosswell

Cary said:
Scott,

Thank you for the reply. I am going to be one of those people creating both
the custom script ( most likely an HTA... ) and then later the application
that will do this ( there are several apps that I have downloaded right now
that I am examining to see what they do and what they do not do so that I
can take the good from all of them and avoid missing anything...if that is
possible ).

My concern was that in a larger environment that WMI is too clunky ( read:
bloated ). Someone whose opinion I respect says that he always tries to
find another way to do the things that WMI does....especially in larger
environments. Since I am pretty new to both WMI and ADSI I wanted to check
with the pros.....

WMI is far from clunky - try searching the file system for a file using
WMI - it's about 5 times faster than the search built into windows.

Some gotchas to look out for though:
- WMI will have to be installed on pre Win2k/WinME machines.
- DCOM needs to be configured to run automatically on Win9x machines
- You'll need to verify DCOM permissions on any machines that give you
grief during a remote audit
- DEP settings need to be checked as well
- Some OSs don't support all of the fields/classes that you'll find in
WinXP... so you'll have to either ignore those fields or create logic to
handle this
- We've found that a significant percentage of the machines out there
actually have broken WMI repositories which prevent access to certain
classes... you'll have to either avoid using those classes or reinstall
the OS on those machines
- Traffic over the network may also be a concern (especially if the app
that you write is going to be threaded and performing multiple audits
simultaneously). If you're just grabbing hardware info then this
shouldn't be too much of a problem but if you're grabbing software info
as well then you might want to run the wmi script or audit agent on the
machine itself and just send back a compressed snapshot of all the info
it found to your central inventory/server - rather than issuing the WQL
receiving WQL result sets over the wire.

--

Best Regards,

James Crosswell
Software Engineer
Microforge.net Limited
http://www.microforge.net
 
J

James Crosswell

Branimir said:
May be paying for MS SMS or IBM Tivoli aint't such a
bad idea after all ;)

Indeed - you don't even have to pay that much - there are plenty of
companies out there that sell hardware/software auditing solutions for
less than $10 a machine.

--

Best Regards,

James Crosswell
Software Engineer
Microforge.net Limited
http://www.microforge.net
 
C

Cary Shultz [A.D. MVP]

Branimir,

Shoot, when you put it like that......

Still, I want to play with this. I always like a good challenge ( and
creating my first application with entirely new technology -well, to me! -
seems like a good idea! ).

Thanks for your head's up....

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com



Branimir Petrovic said:
Cary Shultz [A.D. MVP] wrote:

My concern was that in a larger environment that WMI is too clunky (
read: bloated ). Someone whose opinion I respect says that he always
tries to find another way to do the things that WMI does....especially in
larger environments.

Bloatedness should not be your main worry, but reliability. In my
experience
whenever you are dealing with *many* system - WMI invariably becomes pain
in
the ... Some (of many) systems will have problems with WMI (most trivial
being disabled DCOM), and you will find occasional system where attempt to
instantiate remote WMI object hangs and that would be the "kiss of death"
if your app is single threaded script app (if script application is what
you
have on mind). Then you'll have to come to terms with local firewalls...

Put these two together and the best defense would be to design/make your
app
as local service running on each and every PC you want to work with and
have
that local service "call the mother ship" (web site front end to central
database?). And all of sudden your little project idea becomes huge and
complex application. May be paying for MS SMS or IBM Tivoli aint't such a
bad idea after all ;)

Branimir
 
C

Cary Shultz [A.D. MVP]

James,

I very much appreciate your comments. I looked at your web site ( before
these posts ) but did not download your trial version ( 81MB is way too much
for my dial-up at home....yes, you read that correctly.....where I live
there is no dsl available! ). Will eventually, though. Just from the
office.

Anyway, I am eventually going to undertake this project. I might come back
to you when I get stuck somewhere......if you do not mind!

Right now I am simply looking at HTA but - as mentioned - would like to get
to a 'real' application. But I never have any time for anything so it might
be a good while before I actually start!

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 
M

maximillianx

If you are interested in a freebie solution, check out Winventory here:
http://winventory.sourceforge.net/

This is a MySQL back-end with an audit script that runs and populates the
information in the db. I've not tried it, but it looks handy...it is
intended to run at logon...

Another solution might be to use bginfo from sysinternals, although I'm not
sure how it would respond in a 2000+ PC environment. There is an option to
populate an Access database without changing the background (its initial
function). I've used it in smaller school environments with great success.
Note, you do not have to have Access installed on the computer that bginfo
runs on.

Finally, I have a PC audit script here (very basic), as well as a nifty HTA
front-end that queries remote computer info, however, there is no db backend
behind it. I'm thinking that my next incarnation will include xml
queries/results.

Take a look and see what you think -
http://uphold2001.brinkster.net/vbshf/forum/boxx/items.asp?iid=38 (HelpHTA)
http://uphold2001.brinkster.net/vbshf/forum/forums/thread-view.asp?tid=111&posts=3#M659
(Audit PC and populate Access Database - PC running script must have Access
installed, so it is best used for remote situations)


Rob
 
C

Cary Shultz [A.D. MVP]

I have been up with the little one again ( no rest for the wicked, I
guess!...btw, I would be the 'wicked'; our little one is an ANGEL ) so doing
a little early morning browsing.

It sure does look like there are a ton of solutions on the market out there.
Starting to wonder if I need to reinvent the wheel or if I need to simply
fine a canned solution and modify it to my liking!

Thank you very much for the links. They have lead me to all sorts of neat
web sites.....

Going to look at the WINVentory solution as well as your two solutions.

--
Cary W. Shultz
Roanoke, VA 24012
Microsoft Active Directory MVP

http://www.activedirectory-win2000.com
http://www.grouppolicy-win2000.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top