Using the Get-Command Cmdlet

10/22/2009

2 minutes to read

In this article

Listing All the Windows PowerShell Cmdlets

Can’t remember the name of each and every Windows PowerShell cmdlet? Don’t worry about it; that’s one of the things Get-Command can help you with. Just type Get-Command without any additional parameters and you’ll get back a list of all the Windows PowerShell cmdlets:

Good point: that is a little hard to read, isn’t it? Try piping the results of Get-Command through the Format-List cmdlet (we’ve included the asterisk to indicate that we want back all the properties for each cmdlet):

Here’s a nifty way to use Get-Command. This command grabs the set of cmdlets installed on a computer and pipes that information to Get-Help. Get-Help dutifully retrieves the help topic for each cmdlet, then uses the Out-File cmdlet to save all those help topics to a file named C:\Scripts\Help.txt:

Get-Command | Get-Help | Out-File c:\scripts\help.txt

Run that command and, within a minute or so, you’ll have built yourself a document containing the on-line help available for each and every cmdlet.