Get Snapin commands

Curious about what cmdlets you have available with PowerShell? You can use the Get-Command cmdlet to list them for each running PSSnapin. Here’s a quick one liner that will return all the cmdlets for every snapin you have installed.

foreach ($snapin in (get-pssnapin)) {$snapin.name;get-command -pssnapin $snapin.name | format-table -auto}

This will only return information for snapins that are currently installed. You could take this a step further and send the output to a printer, a file or export to an HTML file.

If you prefer to see more of the definition, a one-liner like this might be better:

foreach ($snapin in (get-pssnapin)) {$snapin.name;get-command -pssnapin $snapin.name | fl Name,CommandType,Definition}

Technorati Tags: , ,