PowerShell Gadget
Tagged as Lab SamplesI’ve recently been having a play around with building some Gadgets for Windows Vista. Since all of us at Mindscape have been playing around with PowerShell I decided it would be cool to integrate PowerShell into the Windows Sidebar in Gadget form. This means you don’t have to fire up your command shell all the time – just type your command into the sidebar to execute it. If you need data displayed the fly-out mode displays the output for the command (e.g. try running ipconfig /all).
This is my first version release of the gadget, I hope that some of you get good mileage out of it. We will soon be releasing the complete source code and some documentation about how we achieved this integration up on the site shortly for those developers who want to learn more about building very rich gadgets.
The gadget leverages the following technologies:
- Windows PowerShell
- Windows Vista SideBar
- Hosting .NET within a Gadget
We are committed to releasing some of the cool things that we build in our spare time in the hope that some people will find them interesting and cool. We always welcome feedback as well. Download the PowerShell Gadget.
UPDATE: This gadget requires PowerShell installed to the default location. :-)
UPDATE: Having more than one instance of the gadget open is broken. I am investigating.
Enjoy,
Andrew Peters
19 Responses to “PowerShell Gadget”
Leave a Reply
![]()
BrainDump (1)
Community Code (1)
Events (6)
General (31)
Lab Samples (2)
LightSpeed (132)
MegaPack (3)
News (48)
Products (64)
Projects (4)
Screencast (6)
SharePoint (1)
Silverlight (5)
Silverlight Elements (12)
SimpleDB Management Tools (11)
Visual Studio (4)
VS File Explorer (5)
WPF (31)
WPF Diagramming (14)
WPF Elements (22)
WPF Property Grid (24)
![]()
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007





Posted by Andrew Peters on 4 April 2007



[...] If you’re interested in checking this project out and downloading the gadget, check out the Mindscape blog post about it. [...]
Aw, its not working for me. Hitting enter after typing a command does nothing, and then clicking the icon causes the flyout to appear slightly larger behind the gadget with no definiable content… I guess I need to have PowerShell installed… Hahaha. I thought it came with Vista by default… Perhaps a mention of this somewhere would save some headaches… :)
Hey hey,
Yep, you need PowerShell installed at the default location. The latest version of the gadget displays a message if it can’t find PowerShell.
Cheers for trying the gadget and let me know if you have any other issues.
Andrew.
[...] Contact « PowerShell Gadget [...]
Hey Andrew, saw the Powershell gadget demoed last night at the Wellington .NET user group — pretty cool, well done!
Do you hide and display a regular powershell window, and pass the keypresses as events? How does it work?
Kirk
[...] night the guys from Mindscape unleashed their powershell gadget onto the world. This very cool gadget allows you to enter powershell commands into a gadget [...]
[...] Länk till Mindscape – MindBlog [...]
Nifty. However, on a multi-screen system, where the sidebar is docked to the right side of the left screen, I get the flyout going toward the right, across the screen boundary. Other gadgets behave normally, so I imagine this is probably a simple oversight somewhere in the flyout handler.
Also, having more than one PS gadget in the sidebar, I experienced some weirdness with the flyout not actually getting populated with a console window. Didn’t explore much there.
Actually, mucking around with IronPython in this, using ctrl-c, ctrl-z, etc I experienced a crash of the sidebar.
Hi kfarmer,
Thanks for having a play with the gadget. With this initial release I figured some of these edge case scenarios would show themselves. I will investigate the issues so stay tuned for new releases.
UPDATE: Having more than one instance of the gadget open is definitely broken. I will investigate this ASAP.
Cheers,
Andrew.
Hi Kirk,
Kind of, the regular PowerShell.exe window is re-parented to a .NET 2 UserControl :-)
Cheers,
Andrew.
[...] gadget (che potete scaricare da questo link: http://www.mindscape.co.nz/blog/?p=12) consente l’inserimento di comandi direttamente nella sidebar o l’apertura di un flyout, una vera e [...]
Wow, this is exactly what I am looking for, however, I have not gotten up to VISTA yet. Can you throw together something that will run on XP?
Fred Jacobowitz
Please see my previous comment. Fred Jacobowitz
Hi Fred,
Sorry but Sidebar gadgets only run on Vista.
Andrew.
[...] across a very creative gadget from Mindscape written by Andrew Peters. Peter created a PowerShell Gadget. This means you don’t have to fire up your command shell all the time. [...]
I have the same issue as kfarmer using dual monitors and the flyout page opens to the right..cool gadget
Well, I undocked the gadget modify the console properties a bit and moved the gadget back into the sidebar and now it opens fine…
by the way using Vista ENT SP1 – 64bits – dual 22 ws mon.
Hi, I found I can’t download this gadget, had you removed that?