Easier PowerPack troubleshooting

One great usability improvement in PowerGUI 1.9 admin console is the new Messages window which shows all information, warning and error messages from the scripts/cmdlets executes in PowerGUI.

For example, if I add a script node with this code:

Write-Host "Starting a sample script which will produce an error"
Write-Warning "Seriously, why not we look for qw:\1234\567?"
Write-Error "Oh-oh, here it goes"
Get-ChildItem qw:\1234\567
throw "Throw works as well ;)"

I will get the Messages pane show up below the grid (or any other location – all panes are now dockable!) and let you see all the messages:


The error ones even have shortcuts to the exact place in code where the error happened!

I can’t imagine going back to troubleshooting my PowerPacks without this. 🙂


3 Responses to “Easier PowerPack troubleshooting”

  1. 1 Ivan August 8, 2009 at 12:10 pm

    Please, could you explain me, how to add an extrnal command to the standard windows shell ( or windows power shell ) ?
    I mean, for exaple, when I have to use egrep for windows, I have to call this command from the directory it’s located in. This problem is easily solved in *nix command interpreters, but I have no idea on how to solve it in Windows.
    Regards, Ivan.

  2. 2 Dmitry Sotnikov August 10, 2009 at 4:52 am

    Ivan, for detailed discussion, I would post this to forums at PowerGUI.org or PowerShell newsgroups.

    The short answer is that external commands in Windows world are basically executable files. If you want these to be found without having to specify the file path you have a few options:

    A. Include the folder in which the executable resides into the %PATH% system variable (in PowerShell world – $env:path), or

    B. In PowerShell, use Set-Alias to give it a short name.

    Hope that helps,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

My Recent Tweets


The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

August 2009
« Jul   Sep »

%d bloggers like this: