I need help with a VBscript to query WMI and resturn system stats for multiple Windows OS

I have very little experience with WMI, but know that it is very powerful and can be used to return lots of information about a running system.  I would like to create a VBscript that I can schedule to run which will write out system stats at run time about the system.  The script needs to work on any windows version that supports WMI.  The metrics I care about are as follows:

- Show OS Name and Version
- Show service pack level
- List CPU
  - List CPU utilization

- Enumerate Network connections
  - List IP Address
  - List Subnet
  - List Gateway
  - List DNS
  - DHCP/Static?
  - List KB/in
  - List KB/out

  - Enumerate all volumes
  - List drive letter and/or volume name
  - List size
  - List freespace
- Enumerate all mapped drives
  - List drive letter

- List Total MEM size in MB
- List Available Mem in MB

- List running services

Has anyone written something like this that they can get me started on?  I have one, but it doesn't work like it should and I am looking for help.  Thanks in advance!
Who is Participating?
slightwv (䄆 Netminder)Connect With a Mentor Commented:
There are TONS of examples out there on many of these.  This is also quite an extensive list.

Is there one more important you would like help with?  I cannot see any Expert writing the entire project for you but I could be wrong.


>>The script needs to work on any windows version that supports WMI

I'm far from a WMI Expert but I can guess what works today can change tomorrow.  not sure if three is a 100% backwords/forwards compatibility.
electricd7Author Commented:
I need the most help with processor utilization and network utilization.  The others are pretty easily defined.
slightwv (䄆 Netminder)Connect With a Mentor Commented:
I've done very little with WMI and CPU/Network isn't one of the things I've done.

See if this has the info you need for CPU:
electricd7Author Commented:
OK I got CPU now.  Basically all I am missing is the ability to list all network adapters and their associated info.
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Sorry.  I've been looking for overall network utilization.

NIC info is: Win32_NetworkAdapter

The list is here:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.