PowerShell Module SysInfo

In this post I will provide you with some information about PowerShell Module SysInfo, which I wrote and published in PowerShell Gallery. This is my second module that I publish and I hope that you will like it. It is being sometime to write a post as I was preparing this module along with its documentation of each command included.

Lets see below what it does.

Module description

The aim of SysInfo module to provide an easier way to system administrators retrieve the information that they want from their systems and the output would be easily readable.

SysInfo module will help you get the system information that you need from local and remote machines. It is a simple module that will allow you to utilize CIM cmdlets in an easier way. Instead of trying to find the class name and filter based on the return code to get the exact data that you need, you can get what you need with SysInfo module. It utilizes CIM cmdlets to get the information from local and remote computer but the output of the properties of the system components has no codes. Codes have been converted into a more readable format, giving you the actual meaning of each code. As different types of sizes are provided in bytes, which in many times this is not helpful, additional properties will be included in the output, providing you the size also in other format that will help you out perform your job.

Let see the differences of using the CIM cmdlets to get system information and cmdlet of SysInfo module.

Easy to remember cmdlets

Cmdlets have been named based on the class name that is used to get the information from the system. This will help those that they are already using CIM cmdlets to know which cmdlet to use. For those that they are new to CIM cmdlets and classes the names are easy enough to learn them. Let’s see some examples below.

[adinserter name=”In Article”]

Example 1

Get processor information

CIM cmdlet:

Get-CimInstance -ClassName Win32_Processor -Property *

CIM Output:

SysInfo cmdlet:

Get-Processor

SysInfo Output:

[adinserter name=”In Article”]

Example 2

Get information of local disk on a computer system.

CIM cmlet:

Get-CimInstance -ClassName Win32_LogicalDisk -Property * | Where-Object {$_.DriveType -eq 3}

CIM Output:

SysInfo cmdlet:

Get-LocalDisk

SysInfo Output:

[adinserter name=”In Article”]

CIM output codes converted into meaningful information

As you may say in the examples above, CIM cmdlets provide the numbers in some case as property values. Each number has a meaning. By using SysInfo cmdlets, it will provide you with the exact meaning of each property. Lets compare few results below:

Example 3

In this example we will see the information for the operating system.

CIM cmdlet:

Get-CimInstance -ClassName Win32_OperatingSystem -Property *

CIM cmdlet output for Operating System information:

SysInfo cmdlet:

Get-OperatingSystem

SysInfo cmdlet output for Operating System information:

[adinserter name=”In Article”]

Example 4

In this example we will see different properties of cache memory information that numbers in properties have been converted.

CIM cmdlet:

Get-CimInstance -ClassName Win32_CacheMemory -Property * | Select-Object -Property Name,Purpose,Availability,StatusInfo, Associativity,CacheType,CurrentSRAM,ErrorAccess, ErrorCorrectType,ErrorDataOrder,ErrorInfo,Level, Location,ReadPolicy,ReplacementPolicy,SupportedSRAM, WritePolicy

Output:

SysInfo cmdlet:

Get-CacheMemory | Select-Object -Property Name,Purpose,Availability,StatusInfo, Associativity,CacheType,CurrentSRAM,ErrorAccess, ErrorCorrectType,ErrorDataOrder,ErrorInfo,Level, Location,ReadPolicy,ReplacementPolicy,SupportedSRAM, WritePolicy

Output:

[adinserter name=”In Article”]

Units conversion

SysInfo module will convert units of properties in more readable format and this will allow you to used the units that you like. Some properties related to size will be provided in bytes and others in KBytes. By using SysInfo, it will calculate automatically and convert those properties and it will add extra properties accordingly based on the size.

Let see some examples to better understand. The last properties in each screenshot are the calculated properties that have been added to the output object.

Get-Processor

Get-LocalDisk

Get-CacheMemory

[adinserter name=”In Article”]

PowerShell Module Cmdlets List

Hope you like SysInfo module.

You feedback is appreciated.

If you have any questions or anything else please let me know in the comments below.

[adinserter name=”In Article”]

Related Links

[adinserter name=”Matched-Content”]