Empower Your PowerShell with PowerGadgets

by Bharat Suneja

Exchange MVP Andy Webb showed off this great tool called PowerGadgets recently that can help you build cool gadgets – with or without Windows Vista. The gadgets take piped output from PowerShell commandlets and scripts (as well as SQL databases and web services).

Why I think this is so cool:
– it allows you to visualize data output by PowerShell commands and scripts. The samples shown here are simply displays, but you can create pretty fancy stuff like gauges and charts
– comparatively, it makes PerfMon – which is a useful tool, but so NT 4.0-ish – look like.. well, NT 4.0-ish :)
– critical or important data can be displayed in real-time or close-to-real-time on your desktop or Windows Vista sidebar
Gadget - Content & Recipient Filter
Andy created a gadget that takes the output from the get-antispamtoprblproviders.ps1 script [read previous post about this script – “Exchange Server 2007: How are RBLs performing?“]. The gadget runs the script and shows you number of messages blocked by the RBL provider Spamhaus.org (if you’re using it with Exchange Server 2007’s IP Blocklist Providers feature).

Yet another one of Andy’s gadgets shows the Top 20 mailboxes by size. Very cool!

Thanks to input from Andy, and Vivek Sharma, I was able to effortlessly create a gadget that shows messages scanned by Exchange Server 2007’s Content Filter agent.

I created another one that shows you number of messages dropped by Recipient Filter using Recipient Validation (drop messages for recipients that do not exist in AD).

Both the above gadgets use real-time output from perfmon counters captured by shell commands and refresh every minute.

You can create gadgets natively from within PowerShell, or use the PowerGadgets Creator GUI that walks you through creating one. Download PowerGadgets from www.powergadgets.com.

Here are the gadgets:
1. Andy’s Spamhaus gadget
2. Andy’s Top 20 Mailboxes gadget
3. Content Filter gadget – shows total messages scanned by Content Filter agent
4. Recipient Filter gadget – shows messages dropped because of invalid recipients

Right-click on the above links and save as/download.

If you’ve created a gadget using PowerShell, spread the word by adding a comment to this post.

{ 3 comments… read them below or add one }

Anonymous February 9, 2007 at 10:40 am

When I try to download the gadgets I get a 404 error. Is there an alternate location for the gadget files?


Bharat Suneja February 9, 2007 at 11:29 am

Thanks for pointing out.

That’s because .PGF was an unknown file type for the server – right-clicking and saving works. Just added the file type to the server – should be able to download by clicking the link now (in IE). Firefox will show the code instead… use Save As. :)


Anonymous June 12, 2007 at 12:48 am

Hi Bharat,

you say :
“use real-time output from perfmon counters captured by shell commands” for your recipient filter gadget and content filter gadget. How / Where do you access those counters ?




Leave a Comment

Previous post:

Next post: