PowerShell Gadget

PowerShell Gadget is a small gadget that hosts the PowerShell console window in your Sidebar.

Commands can be entered straight into the collapsed gadget or, by clicking on the PowerShell icon, the complete PowerShell console is available.


The latest version is 1.3 (see below for change log)



The console settings I’m using below are:

Background: RGB(23, 47, 59)
Foreground: White
Font: Consolas
Font Size: 14

The gadget in flyout mode displaying the output of building itself :-)

PowerShell Gadget

The gadget settings window

PowerShell Gadget

Change Log

Version 1.3

  • Flyout height can now be changed in the Settings window.

Version 1.2

  • Tweaked skin

Version 1.1

  • Flyout console now gets focus automatically.
  • Only one instance of gadget can be open at once.
  • Improved flyout sizing code.

Version 1.0

  • Initial release.

Leave a response

  1. Kevin KidderNo Gravatar Tue, 19 Jun 2007 20:29:06 CDT

    I love the PowerShell gadget! I don’t know if there is anyway to do this, but when cmdlet or script runs out of control, a CTRL-C restarts the entire sidebar, including all running gadgets.

    Keep up the good work!


  2. emre ayrılmazNo Gravatar Tue, 10 Jul 2007 14:00:43 CDT

    thanks this gadget my friend. sooo successful.

  3. Tue, 17 Jul 2007 12:28:48 CDT

    Nice work Andrew. I linked to the gadget from an article I just wrote at .



  4. Fri, 03 Aug 2007 04:04:35 CDT

    Would love to use it, in fact have just installed Powershell just so I COULD use it - but the link appears dead.

    gives a 404 not found.

    Is there another link, or am I being dumb?

  5. AndrewNo Gravatar Sat, 04 Aug 2007 22:08:55 CDT

    I’ve fixed the link.



  6. Sun, 02 Sep 2007 19:04:05 CDT

    Hi there! Thought I’d let you know about a couple of problems:

    If you type Exit (at least into the flyout) then the underlying PowerShell seems to exit and there’s no way to get it back. (I figured it might close the flyout, and I also just wanted to see what’d happen. :))

    After doing that I closed the flyout and re-opened it, then pressed Ctrl-C while the still-dead flyout had the focus. This crashed the Sidebar completely.

  7. Tue, 11 Sep 2007 15:10:21 CDT

    thanks for your great tool. I will use it during our upcomming Usergroup metting. While using it i came into the need to run the shell as an administator. Do you see a chance to implement such a feature?

  8. HarleyNo Gravatar Wed, 19 Sep 2007 11:29:27 CDT

    Powershell not found?!?!?!

  9. NiklasNo Gravatar Wed, 26 Sep 2007 04:39:54 CDT

    Same here “Powershell not found”. New problem or am i doing something wrong??

  10. AndrewNo Gravatar Wed, 26 Sep 2007 15:11:55 CDT

    Is PowerShell installed?

  11. NiklasNo Gravatar Wed, 26 Sep 2007 15:43:48 CDT

    I downloaded the gadget… renamed .zip to gadget… installet.. and the error message is shown inside the gadget on the sidebar.

  12. AndrewNo Gravatar Wed, 26 Sep 2007 17:20:34 CDT

    You need to install PowerShell from Microsoft.

  13. NajibulahNo Gravatar Sun, 11 Nov 2007 00:09:01 CST

    This truly IS the real man’s gadget!

  14. JasonNo Gravatar Thu, 22 Nov 2007 02:23:02 CST

    I’m getting an error. I have PowerShell installed (latest non-CTP version) and when I open the Sidebar with the PowerShell gadget running I get a runtime error. Line 53, Object doesn’t support this property or method.

    If I remove and reinstall the gadger while the Sidebar’s running I get a runtime error on line 78, Object doesn’t support this property or method.

    Neither of these actually crashes the gadget, or the Sidebar. Clicking on the gadget to get the flyout gets another runtime error, line 53 again.

    The only major thing I can think of that I’ve done recently is disable User Access Control,

  15. AndrewNo Gravatar Thu, 22 Nov 2007 03:23:15 CST

    Hi Jason,

    Disabling UAC might have done it. The gadget uses a custom COM component that gets registered differently depending on whether UAC is on or off.

    The COM dll may be registered manually by running the regasm.exe tool like so:

    regasm \PowerShellGadget.gadget\Bin\Mindscape.Gadgets.PowerShell.dll /codebase

    On my machine “gadget home” is C:\Users\Andrew\AppData\Local\Microsoft\Windows Sidebar\Gadgets

    Make sure you restart the Sidebar after doing this.



  16. JasonNo Gravatar Thu, 22 Nov 2007 19:54:48 CST

    Hi Andrew,

    Thanks for the quick reply! I tried using RegASM as you suggest, but ran into several problems. First there were several versions of RegASM on the system from the various .NET Frameworks. The one that seemed to work was the v2 one.

    Second, for me to get the commnad you supplied to work I had to extract the contents of the .gadget file into a folder, in the GadgetHome. Is this correct or should the statement be able to read into archives?

    Third, was that even after extracting the archive into a folder and running RegASM on the .dll you reference the runtime errors were unaffected. I tried it several times, from restarting the Sidebar and restarting the system. I’d be more than willing to carry this into emails if you want to access more technical details, like Event Logs etc.

  17. MatthiasNo Gravatar Thu, 20 Dec 2007 15:33:23 CST

    HI Andrew,
    any way to get this to work on a 64-Bit Vista where the Powershell is installed in wow64?

    Great work :-)

  18. LucasNo Gravatar Wed, 30 Jan 2008 12:30:55 CST


    I’m about finished with a network scripting course and I’ve been digging around for cool stuff to do for a course project. I saw this and was wanting to play with it a bit. It just looks and sounds awesome. But, does it work with XP pro?

  19. ZachNo Gravatar Sat, 02 Feb 2008 20:12:07 CST

    Excellent! Very impressed, at first I was just looking for a good cmd prompt gadget, I have not even used powershell yet. Works great and I’m excited to learn more about powershell. Thanks.

  20. DrAg0nNo Gravatar Sat, 09 Feb 2008 22:00:28 CST

    I found a bug :

    If i press CTRL-C to stop a ping command it makes crash the whole sidebar

  21. Tue, 25 Mar 2008 19:20:54 CDT

    Your Gadget has been linked on

  22. Sat, 19 Apr 2008 04:23:56 CDT

    [...] Peter’s PowerShell Gadget. Now despite being on the Beta for Vista, my machines are back to running a mixture of XP and Linux [...]

  23. Sat, 10 May 2008 01:02:29 CDT

    [...] I was just doing some searching for some more onformation and scripts for Powershell and I came across this nice little Gadget for the Windows Vista Sidebar. [...]

  24. Wed, 03 Dec 2008 16:20:39 CST

    [...] https://andrewpeters.net/powershell-gadget/ Filed under: PowerShell [...]

  25. ɓɘɐɔɧNo Gravatar Sat, 20 Dec 2008 02:34:57 CST

    tryed this on windows 7 build 6956, doesnt work.

  26. Dominic FitzpatrickNo Gravatar Wed, 14 Jan 2009 11:39:31 CST

    I find the scroll bar in the flyout covers the last few characters on the right. I can’t change the buffer width to be less than the window width, which I think would fix the problem.

    I can reduce the height of the flyout until the scroll bar disappears which cures the problem but reduces the usefulness of the gadget and looks ugly!

  27. Sat, 24 Jan 2009 08:02:39 CST

    Agree with ‘beach’
    This doesn’t work in Windows 7 build 7000.
    Please correct the problem.

  28. Leo DavidsonNo Gravatar Mon, 26 Jan 2009 13:07:21 CST

    Have you determined that the problem is the gadget’s fault rather than Windows 7’s? If not, how do you know what needs fixing? Windows 7 is the product in beta where the manufacturer is asking for bug reports and feedback, afterall.

  29. SrkNo Gravatar Fri, 13 Mar 2009 12:19:01 CDT

    Please fix it for win7 build 7000

  30. Sun, 22 Mar 2009 04:39:24 CDT

    thanks for your great tool. I will use it during our upcomming Usergroup metting. While using it i came into the need to run the shell as an administator. Do you see a chance to implement such a feature?

  31. Mon, 30 Mar 2009 23:02:10 CDT

    This is a great gadget, Thanks and Congratulations.

    Too sad you wasn’t able to fix the CTRL+C issue yet, btw, as you probably guessed already, the break signal seems to bypass the shell being intercepted by sidebar.exe as well, what causes it to die, futhermore if you dont click over ‘find solution/close program’ you’ll notice sidebar *isn’t* really crashed, since all gadgets continue working. it’s just by the break signal being “sent” to sidebar… shouldn’t this bring any light to fix it?… please, all we shell lovers need this fixed! ;-)

  32. Mon, 30 Mar 2009 23:11:20 CDT

    hmm…. btw, noticed right now that just clicking ctrl+c over the shell (no command running) closes sidebar as before, but with a DEP warning (!?) no idea…

  33. BillScottNo Gravatar Fri, 22 May 2009 14:00:10 CDT

    Is it possible to get the PowerShell Gadget to add the snapin for vmware tools automatically? Have tried to modify the profile but doesnt seem to work…

  34. anthonyNo Gravatar Thu, 02 Jul 2009 08:11:58 CDT

    i am running windows 7 build 7100. The powershell gadget runs, and appears to run commands correctly too, (i typed in dir, and then clicked the flyout button and saw the output being printed). But when the flyout is opened it displays for an instant, then brings up a blank .net framework warning box. email me for a printscreen.

  35. Tue, 21 Jul 2009 19:44:45 CDT


    Thanks for great gadget. I am having same issue anthony reported. Commands seem to run but when I open fluout, it closes and throws .net framework error. I am on Win 7 RC x64.

    Any help is appreciated.