Client Inventory through PowerShell

There are numerous ways of doing a Client Inventory in the Windows environment. You can use various Microsoft technologies to accomplish this, you can collect information stored in the registry or you can retrieve information through WMI.

In this post, I’m going to show how to do this through WMI and PowerShell. WMI is a versatile extension to the Windows Driver Model that provides an OS interface which components can provide information through. Both PowerShell and Vbs can retrieve information from WMI in a flexible way.

Starting off, lets look at information from the OperatingSystem, this can be retrieved through the Win32_OperatingSystem class.

PS > Get-WmiObject Win32_OperatingSystem

SystemDirectory : C:\Windows\system32
Organization    :
BuildNumber     : 7000
RegisteredUser  : nigo
SerialNumber    : 00447-321-7001114-70264
Version         : 6.1.7000

To get even more information we can pipe it to Format-List *,which displays all information retrieved.

I’ve put togheter a Script that retrieves Client Information from your computer or a remote computer and returns the information in a PsObject. If you are running the script on Remote clients, make sure that the Firewall allows remote administration, otherwise the script won’t work.

The Network Inventory in this script only takes the first NetworkAdapter found and retrieves the information. if you have multiple NetworkAdapters you have to modify the script.

PS > .\Get-Inventory.ps1 .

Gathering Client Information From: .

UserName             : GOT-ZIP-NIGO\nigo
ComputerName         : GOT-ZIP-NIGO
ScreenModel          : NVIDIA Quadro FX 570M (Prerelease - WDDM 1.1)
ChassisType          : Notebook
ComputerManufacturer : Hewlett-Packard
ComputerModel        : HP Compaq 8510w
SerialNumber         : 00447-321-7001114-70264
RAM                  : 3054 MB
CPU                  : Intel(R) Core(TM)2 Duo CPU T7700  @ 2.40GHz
HDDTotal             : 114471 MB
HDDFreeSpace         : 78976 MB
OperatingSystem      : Microsoft Windows 7 Ultimate
Language             : 1033
Domain               : WORKGROUP
IPAdress             :
SubNet               :
MACAddress           : 00:76:E4:EE:49:00

Click Here to download the script.

Rating 3.67 out of 5

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam Protection by WP-SpamFree