PowerShell Gadget

I’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.


Andrew Peters

Tagged as Lab Samples

20 Responses to “PowerShell Gadget”

  • […] 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.


  • […] 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?

  • […] 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.



  • Hi Kirk,

    Kind of, the regular PowerShell.exe window is re-parented to a .NET 2 UserControl :-)



  • […] 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.


  • […] 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?

  • Hey,
    this gadget is pretty awesome and exactly what i`m looking for.

    (1.) is it also somehow possible to trigger/control the “toggle flyout mode” by any abbreviated keyboard command? So that I do not have to use the mouse each time?
    (2.) why does the Power Shell starts in C:\Windows\System32 and not in my root directory?

    I hope my English is more or less understandable,
    cheers Niclas

  • Leave a Reply


Join our mailer

You should join our newsletter! Sent monthly:

Back to Top