{"id":217,"date":"2007-10-03T15:31:11","date_gmt":"2007-10-03T23:31:11","guid":{"rendered":"http:\/\/testblog.sapien.com\/index.php\/2007\/10\/03\/get-snapin-commands\/"},"modified":"2007-10-03T15:31:11","modified_gmt":"2007-10-03T23:31:11","slug":"get-snapin-commands","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2007\/10\/03\/get-snapin-commands\/","title":{"rendered":"Get Snapin commands"},"content":{"rendered":"<p>Curious about what cmdlets you have available with PowerShell? You can use the Get-Command cmdlet to list them for each running PSSnapin. Here&#8217;s a quick one liner that will return all the cmdlets for every snapin you have installed.<\/p>\n<p><font face=\"Lucida Console\" color=\"#0000ff\" style=\"color: rgb(0, 0, 255);\">foreach ($snapin in (get-pssnapin)) {$snapin.name;get-command -pssnapin $snapin.name | format-table -auto}<\/font><\/p>\n<p>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.<\/p>\n<p>If you prefer to see more of the definition, a one-liner like this might be better:<\/p>\n<p><font face=\"Lucida Console\" color=\"#0000ff\" style=\"color: rgb(0, 0, 255);\">foreach ($snapin in (get-pssnapin)) {$snapin.name;get-command -pssnapin $snapin.name | fl Name,CommandType,Definition}<\/font> <\/p>\n<div style=\"margin: 0px; padding: 0px; display: inline;\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:5c6b3fb7-3b10-4e52-9fa6-abfe92dae027\" class=\"wlWriterSmartContent\">Technorati Tags: <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/PowerShell\">PowerShell<\/a>, <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Snapin\">Snapin<\/a>, <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Get-Command\">Get-Command<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Curious about what cmdlets you have available with PowerShell? You can use the Get-Command cmdlet to list them for each running PSSnapin. Here&#8217;s a quick one liner that will return all the cmdlets for every snapin you have installed.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-windows-powershell"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=217"}],"version-history":[{"count":0,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/217\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}