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 HOSTNAME
- 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!
electricd7Asked:
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.

Hostname:
http://www.bytemycode.com/snippets/snippet/147/

>>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.
0
 
electricd7Author Commented:
I need the most help with processor utilization and network utilization.  The others are pretty easily defined.
0
 
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:
http://msdn.microsoft.com/en-us/library/aa394271%28VS.85%29.aspx
0
 
electricd7Author Commented:
OK I got CPU now.  Basically all I am missing is the ability to list all network adapters and their associated info.
0
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Sorry.  I've been looking for overall network utilization.

NIC info is: Win32_NetworkAdapter
http://msdn.microsoft.com/en-us/library/aa394216%28v=VS.85%29.aspx



The list is here:
http://msdn.microsoft.com/en-us/library/aa394084%28v=VS.85%29.aspx
0
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.