Introduction to PowerGadgets

 

PowerGadgets is an IT monitoring product from SoftwareFX, making it possible to create real-time monitoring gadgets such as charts, gauges and maps. Its been on the market for some years, I think it was released back in 2006 in the timeframe Windows PowerShell 1.0 was released.

When the product is installed you can either add it to an existing PowerShell session by using Add-PSSnapin PowerGadgets, or by launching it from the Start-menu where you can also find the help-file, a quick start guide as well as a PowerGadgets Creator:

image

 

To show some basic usage Ive decided to use Microsoft Exchange Server 2010 as a data source to provide a couple of gauges showing the number of e-mails sent and received the last day:

001
002
003
004
005
Add-PSSnapin PowerGadgets
Import-PSSession -Session (New-PSSession -ConnectionUri http://exch-jr-02.rbk.ad/PowerShell -ConfigurationName Microsoft.Exchange) -CommandName Get-MessageTrackingLog 

Get-MessageTrackingLog -Start (Get-Date -Format MM.dd.yyyy) -EventId receive | Measure-Object | Out-Gauge -Type digital -Refresh 00:00:05 -Caption “Received – last day”
Get-MessageTrackingLog -Start (Get-Date -Format MM.dd.yyyy) -EventId send | Measure-Object | Out-Gauge -Type digital -Refresh 00:00:05 -Caption “Sent – last day”

 

The sample code above will produce the following two gauges which refreshes every 5 seconds:

image

In the example above Ive installed PowerGadgets on my local workstation, and leverage PowerShell remoting to access the information from the Exchange server.

As far as I can see, there are examples provided only for the Out-Chart cmdlet within the PowerShell help text, a good idea would be to add examples to all of the PowerGadgets cmdlets in upcoming releases, as PowerShell are built for discovery through the help system.

Although there are many examples provided in the Samples-directory in the installation-folder:

image

In addition the help file are great for information and some examples:

image

 

A fast and easy way to customize the output without going deep into the documentation is to use the –Configure parameter on the Out-* cmdlets.

This will popup your data in the PowerGadgets Template Creator:

image

When changes are made, you can save the configuration as a template file, which can then be specified by using the –Template parameter on the cmdlets.

By using the –Output parameter, you can specify a filename (png,bmp or wmf)) which lets you i.e. display the output on a webserver. To automate the process, the scripts you create may be set up as scheduled tasks.

An example showing the number of users per Organization Unit using Out-Chart:

001
002
003
004
005
006
007
008
009
010
011
012
Add-PSSnapin PowerGadgets
Import-Module ActiveDirectory 

$OUs = Get-ADOrganizationalUnit -SearchBase “OU=Departments,DC=contoso,DC=com” -SearchScope OneLevel -Filter * |
Select-Object Name,DistinguishedName
$data = foreach ($OU in $OUs) {
$count = (Get-ADUser -Filter * -SearchBase $OU.DistinguishedName | Measure-Object).Count
add-member -inputobject $ou -membertype NoteProperty -Name Count -Value $count
Write-Output $ou
}

$data | Out-Chart -Values Count -Label Name

 

image

 

There is also an Out-Map cmdlet available, which PowerShell MVP Marco Shaw has provided some example usage on here.

 

Pricing

The pricing of the product is 99 USD, however, you may first want to download a 30 days trial from here.
If you`re an active PowerShell community member, you may also qualify for a free license through the PowerGadgets ISV program.

 

Resources

PowerGUI and PowerGadgets

Monitoring VMWare with PowerGadgets

2 thoughts on “Introduction to PowerGadgets

  1. Pingback: Episode 135 – Adam Driscoll and the New vWorkspace PowerShell Module « PowerScripting Podcast