• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

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!
  • 3
  • 2
3 Solutions
slightwv (䄆 Netminder) 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) 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) Commented:
Sorry.  I've been looking for overall network utilization.

NIC info is: Win32_NetworkAdapter

The list is here:

Featured Post

What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now