blog.powershell.no

On Windows PowerShell and other admin-related topics

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. It`s 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 I`ve 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 I`ve 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

Advertisements

January 16, 2011 - Posted by | Monitoring, Windows PowerShell |

2 Comments »

  1. […] MVP Jan Egil Ring did an Introduction to PowerGadgets […]

    Pingback by Episode 135 – Adam Driscoll and the New vWorkspace PowerShell Module « PowerScripting Podcast | January 25, 2011 | Reply

  2. I couldn’t make it work. I got some errors and I just gave up. I hope I find som help here. But thanks for help anyway

    Comment by billig søkemotoroptimalisering | May 18, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: