PowerShell with a Purpose Blog

PowerShell v3: Graphically complete commands

First: Seemy caveats regarding PowerShell v3

One of the toughest things about teaching PowerShell to newcomers - especially those with minimal or no command-line experience - is in getting parameters right. Too often, I'll see folks trying this:

Get-Service -BITS

When what they mean to type is this:

Get-Service -Name BITS

It's a subtle, but obviously important, difference. PowerShell v3 aims to help these newcomers with Show-Command, a new cmdlet that creates a graphical display for parameter entry. For example, run this (you can only do this with a single command, not a whole pipeline):

Show-Command -name Invoke-Command

And PowerShell pops up a handy GUI to complete the command.



Essentially, each tab represents one of the parameter sets on the cmdlet, and each tab contains the parameters that belong to that parameter set. Pick a tab, fill in the values, and click either Run to run the command as-is, or Copy to copy the complete syntax to the clipboard - where you can paste it into the shell and review what it's done. Cool!
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish