Mindscape Mindblog

PowerShell Gadget

tag icon Tagged as Lab Samples

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.

Enjoy,

Andrew Peters

19 Responses to “PowerShell Gadget”

  1. [...] If you’re interested in checking this project out and downloading the gadget, check out the Mindscape blog post about it. [...]

  2. 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… :)

  3. 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.

  4. [...] Contact « PowerShell Gadget [...]

  5. 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

  6. [...] 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 [...]

  7. [...] Länk till Mindscape – MindBlog [...]

  8. 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.

  9. Actually, mucking around with IronPython in this, using ctrl-c, ctrl-z, etc I experienced a crash of the sidebar.

  10. 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.

  11. Hi Kirk,

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

    Cheers,

    Andrew.

  12. [...] 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 [...]

  13. 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

  14. Please see my previous comment. Fred Jacobowitz

  15. Hi Fred,

    Sorry but Sidebar gadgets only run on Vista.

    Andrew.

  16. [...] 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.  [...]

  17. I have the same issue as kfarmer using dual monitors and the flyout page opens to the right..cool gadget

  18. 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.

  19. Hi, I found I can’t download this gadget, had you removed that?

Leave a Reply