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.

Download

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

PowerShellGadget.gadget

ScreenShots

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

Leave a response

  1. Kevin Kidder 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!

    K^2

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

    thanks this gadget my friend. sooo successful.

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

    Nice work Andrew. I linked to the gadget from an article I just wrote at http://blogs.technet.com/keithcombs/archive/2007/07/16/windows-vista-product-guide-screencast-sidebar-and-gadgets.aspx.

    Regards,

    Keith

  4. Paul Neve 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.

    http://mindscape.co.nz/downloads/PowerShellGadget.gadget gives a 404 not found.

    Is there another link, or am I being dumb?

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

    I’ve fixed the link.

    Cheers,

    Andrew.

  6. Leo Davidson 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. Rolf Tue, 11 Sep 2007 15:10:21 CDT

    Hi,
    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. Harley Wed, 19 Sep 2007 11:29:27 CDT

    Powershell not found?!?!?!

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

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

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

    Is PowerShell installed?

  11. Niklas 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. Andrew Wed, 26 Sep 2007 17:20:34 CDT

    You need to install PowerShell from Microsoft.

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

    This truly IS the real man’s gadget!

  14. Jason 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. Andrew 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.

    Cheers,

    Andrew.

  16. Jason 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. Matthias 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 :-)
    Matthias

  18. Lucas Wed, 30 Jan 2008 12:30:55 CST

    Howdy,

    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. Zach 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. DrAg0n 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. PwrShell.net Tue, 25 Mar 2008 19:20:54 CDT

    Your Gadget has been linked on http://www.PwrShell.net

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

Comments