Discovering Useful Console Commands

by Oct 18, 2012

There are plenty of useful console commands such as ipconfig, whoami, and systeminfo. Most of these commands hide inside the Windows folder. Here's a clever function that lists all available commands with a short description of what they do in a window:

function Get-ConsoleCommand
{
$ext = $env:pathext -split '' -replace '\.','*.'
$desc = @{N='Description' E={$_.FileVersionInfo.FileDescription}}
Get-Command -Name $ext | 
   Select-Object Name, Extension, $desc |
   Out-GridView
}
PS> Get-ConsoleCommand

Twitter This Tip! ReTweet this Tip!