Monday, August 27, 2007

Things that makes your life easier

PowerShell Community Extensions has a powerful utility called echoargs.exe. This file can help you "see" how the target file/function processes the arguments sent to it, thus troubleshooting any argument related errors.

One such case discussed in the PowerShell Newsgroup, where Keith explained what was the problem (You can find a copy of the post here).

I couldn't resist, so I fired PowerShell :)

function echo-args{
    for($i=0;$i -lt $args.length;$i++){
        "Arg $i is <" +$args[$i]+">";

>> echo-args -n iso WinPE2.iso

Arg 0 is <-n>
Arg 1 is <-betfsboot>
Arg 2 is <.com>
Arg 3 is <iso>
Arg 4 is <WinPE2.iso>



No comments: