{"id":5011,"date":"2012-09-07T00:01:00","date_gmt":"2012-09-07T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/09\/07\/discover-windows-powershell-3-0-cmdlets\/"},"modified":"2012-09-07T00:01:00","modified_gmt":"2012-09-07T00:01:00","slug":"discover-windows-powershell-3-0-cmdlets","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/discover-windows-powershell-3-0-cmdlets\/","title":{"rendered":"Discover Windows PowerShell 3.0 Cmdlets"},"content":{"rendered":"<p><b>Summary<\/b>: Microsoft Scripting Guy, Ed Wilson, talks about discovering Windows PowerShell 3.0 cmdlets.<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. There are still a few tickets available for <a href=\"http:\/\/powershellsaturday.com\/002\/\" target=\"_blank\">Windows PowerShell Saturday<\/a> in Charlotte, North Carolina on September 15, 2012. The agenda includes sessions about Active Directory, SharePoint, Exchange Server, Windows&nbsp;8, in addition to beginner and advanced Windows PowerShell sessions. This is a great chance to learn about Windows PowerShell from world class speakers, meet fellow Windows PowerShell enthusiasts, and fill your contact lists with excellent resources. Yep&mdash;networking at a Windows PowerShell Saturday event is always exceptional, and this event will prove to be another opportunity to meet new friends and to make important Windows PowerShell contacts.<\/p>\n<p>You may want to take <a href=\"http:\/\/674004.polldaddy.com\/s\/powershell-summit-na-2013\" target=\"_blank\">the survey<\/a>&nbsp;that was put out by the community group organizing the next Windows PowerShell Deep Dive in Redmond, Washington at the Microsoft Campus in April 2013. This is a great chance to make your voice heard.<\/p>\n<p>One of the things I really like about Windows PowerShell 3.0 (in general&mdash;not necessarily in Windows 8) is that it is more discoverable than previous versions of Windows PowerShell. Now, don&rsquo;t get me wrong. Even Windows PowerShell 1.0 was highly discoverable. In fact, the same three cmdlets you used then still work: <b>Get-Help<\/b>, <b>Get-Command<\/b>, and <b>Get-Member<\/b>. They are still the most basic cmdlets you will use. However, there is now a new one now. <b>Show-Command<\/b> is the name of the new cmdlet. You do not pipe a cmdlet to the <b>Show-Command<\/b> cmdlet. This generates an error (as illustrated here when I piped the <b>Get-Process<\/b> cmdlet to <b>Show-Command<\/b>).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3443.HSG-9-7-12-01.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3443.HSG-9-7-12-01.png\" alt=\"Image of error message\" title=\"Image of error message\" \/><\/a><\/p>\n<p>To use the <b>Show-Command<\/b> cmdlet, you can specify the name of the cmdlet to <b>Show-Command<\/b> when calling it. This technique is shown here.<\/p>\n<p style=\"padding-left: 30px\">Show-Command -Name Get-Process<\/p>\n<p>When you do this, the <b>Show-Command<\/b> window appears, and the Windows PowerShell console pauses until you close the <b>Show-Command<\/b> window or you specify parameters for the cmdlet. In the example shown here, I add a process name to the <b>Show-Command<\/b> window prior to pressing <b>Run<\/b> to run the command.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7635.HSG-9-7-12-02.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7635.HSG-9-7-12-02.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>After the <b>Run<\/b><i> <\/i>button is pressed, the <b>Show-Command<\/b> window closes, and the created Windows PowerShell command is written to the Windows PowerShell console. Then the command executes, and the results appear in the console. This is illustrated in the image shown here.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5516.HSG-9-7-12-03.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5516.HSG-9-7-12-03.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>Another way to use the <b>Show-Command<\/b> cmdlet is to simply launch the <b>Show-Command<\/b> window. It details all the commands from all modules. To explore commands from a specific module, select it from the <b>Modules<\/b><i> <\/i>drop-down list. This works even for custom modules. In the image shown here, I select my WMI module, and it displays all of the advanced functions that are contained in that module.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5543.HSG-9-7-12-04.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5543.HSG-9-7-12-04.png\" alt=\"Image of menu\" title=\"Image of menu\" \/><\/a><\/p>\n<p>If I want to, I can choose one of the commands, and the dialog changes to display the parameters from the command. I can then run the command, or copy the command that gets created.<\/p>\n<p>Keep in mind that I was demonstrating how to use this useful tool from within the Windows PowerShell console, but it also exists in the new and improved Windows PowerShell ISE.<\/p>\n<p>That is about it for today, join me tomorrow for more Windows PowerShell cool stuff.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about discovering Windows PowerShell 3.0 cmdlets. Microsoft Scripting Guy, Ed Wilson, is here. There are still a few tickets available for Windows PowerShell Saturday in Charlotte, North Carolina on September 15, 2012. The agenda includes sessions about Active Directory, SharePoint, Exchange Server, Windows&nbsp;8, in addition to beginner and [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[364,3,45],"class_list":["post-5011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powershell-3-0","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about discovering Windows PowerShell 3.0 cmdlets. Microsoft Scripting Guy, Ed Wilson, is here. There are still a few tickets available for Windows PowerShell Saturday in Charlotte, North Carolina on September 15, 2012. The agenda includes sessions about Active Directory, SharePoint, Exchange Server, Windows&nbsp;8, in addition to beginner and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=5011"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=5011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=5011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=5011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}