{"id":4842,"date":"2012-10-11T00:01:00","date_gmt":"2012-10-11T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/10\/11\/using-categories-to-help-search-powershell-help\/"},"modified":"2012-10-11T00:01:00","modified_gmt":"2012-10-11T00:01:00","slug":"using-categories-to-help-search-powershell-help","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/using-categories-to-help-search-powershell-help\/","title":{"rendered":"Using Categories to Help Search PowerShell Help"},"content":{"rendered":"<p><b>Summary<\/b>: Learn how to use advanced features in the Windows PowerShell <b>Get-Help<\/b> cmdlet to quickly find PowerShell Help information.<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. It seems that my schedule keeps getting fuller. Tonight is the <a href=\"http:\/\/www.powershellgroup.org\/content\/october-meeting-special-date-october-11-2012\" target=\"_blank\">Windows PowerShell User Group in Charlotte<\/a>. We will be having a script club, so it should be a really cool learning opportunity. If you have never been to a script club meeting, they are a bit different. For example, tonight we will have a scenario, and everyone will have a certain amount of time to solve the scenario. Then each participant will have a chance to explain their script to the group. It is great learning opportunity. Beginners can ask questions, and solicit help from the more experienced club members. You do not have to make a presentation if you do not want to do so. I always learn something due to the many different ways of approaching a specific problem. If you are in the area tonight, stop on by, it will be great fun.<\/p>\n<p>On Monday October 15, 2012, I speak at the Raleigh SQL users group <a href=\"http:\/\/www.tripass.org\/dnn\/\" target=\"_blank\">Raleigh SQL Server User Group<\/a> about using Windows PowerShell to manage SQL Server 2012. It will be a lot of fun. Then <a href=\"http:\/\/powershellsaturday.com\/003\/speakers\/\" target=\"_blank\">Windows PowerShell Saturday #003<\/a> happens in Atlanta, Georgia on October 27. I will be making two presentations there. Of course, the Scripting Wife will be accompanying me to all of these October events. It seems the list of where I will be changes on a daily basis, so you can always check the <a href=\"http:\/\/technet.microsoft.com\/en-us\/scriptcenter\/hh182567\" target=\"_blank\">Scripting Community page<\/a> to see upcoming Windows PowerShell events in your area.<\/p>\n<h2>Playing around with Get-Help<\/h2>\n<p>The more I play around with the <b>Get-Help<\/b> cmdlet, the more I like it. I also seem to continue to find new things to explore with this cmdlet.<\/p>\n<p style=\"padding-left: 30px\"><b>Note&nbsp;&nbsp;&nbsp;<\/b>In Windows PowerShell 3.0 you must first use the <b>Update-Help<\/b> cmdlet to update the help files. See <a href=\"http:\/\/blogs.technet.com\/search\/searchresults.aspx?q=update-help&amp;sections=7618\" target=\"_blank\">this collection of blogs<\/a> that talk about updatable Help in Windows PowerShell&nbsp;3.0.<\/p>\n<p>When first learning Windows PowerShell, it is important to get good at using the <b>Get-Command<\/b> cmdlet, the <b>Get-Member<\/b> cmdlet and the <b>Get-Help<\/b> cmdlet. Each of these cmdlets are important because they help with the discoverability of Windows PowerShell. In addition, each cmdlet is powerful and has multiple levels of use. Today, I want to talk a bit about using the <b>Get-Help<\/b> cmdlet.<\/p>\n<p>There is no alias created for the <b>Get-Help<\/b> cmdlet, but there is a function called Help. You can use the Help function in the same way that you would use the <b>Get-Help<\/b> cmdlet. The difference is that the Help function contains a built-in <b>More<\/b><i> <\/i>function. It will automatically display information, one page at a time, when the information takes more than a single page to display in the Windows PowerShell console. In the Windows PowerShell ISE, there is no pager; therefore, the <b>More<\/b><i> <\/i>function does not work.<\/p>\n<p>By default, when using the <b>Get-Help<\/b> cmdlet, most people type <b>Get-Help<\/b> and a name of a cmdlet, for example, <b>Get-Process<\/b>. The command to display Help information about the <b>Get-Process<\/b> cmdlet is shown here.<\/p>\n<p style=\"padding-left: 30px\">Get-Help Get-Process<\/p>\n<p>The command and associated output are shown in the image that follows.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5488.hsg-10-11-12-01.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5488.hsg-10-11-12-01.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>There are four levels of detail that are displayed by the <b>Get-Help<\/b> cmdlet. The levels are Default, Detailed, Full, and Example. The Detailed, Full, and Example levels are accessible via switched parameters. The first, Default, is the default view.<\/p>\n<p>In addition to the four defined levels of Help, additional parameters accept values to aid in searching the Help files for specific information. Some do not work with the core cmdlets, but they could be implemented by Help writers in the future. The three parameters that do not really work right now are <b>Role<\/b><i>, <\/i><b>Component<\/b><i>, <\/i>and <b>Functionality<\/b><i>. <\/i><\/p>\n<p>One of the parameters that is pretty cool is <b>Category<\/b>. Available categories for this parameter are as follows:<\/p>\n<p style=\"padding-left: 30px\">Alias<\/p>\n<p style=\"padding-left: 30px\">Cmdlet<\/p>\n<p style=\"padding-left: 30px\">Provider<\/p>\n<p style=\"padding-left: 30px\">General<\/p>\n<p style=\"padding-left: 30px\">FAQ<\/p>\n<p style=\"padding-left: 30px\">Glossary<\/p>\n<p style=\"padding-left: 30px\">HelpFile<\/p>\n<p style=\"padding-left: 30px\">ScriptCommand<\/p>\n<p style=\"padding-left: 30px\">Function<\/p>\n<p style=\"padding-left: 30px\">Filter<\/p>\n<p style=\"padding-left: 30px\">ExternalScript<\/p>\n<p style=\"padding-left: 30px\">AllDefaultHelp<\/p>\n<p style=\"padding-left: 30px\">Workflow<\/p>\n<p>Because of the way that Windows PowerShell 3.0 automatically finds information in modules that are not yet loaded, use of the <b>Get-Help<\/b> command provides information about items from the various categories even if they are not loaded. For example, the following command returns Help information on my system, because I have a <i>haswmivalue <\/i>filter in my HSGWMImoduleV6.<\/p>\n<p style=\"padding-left: 30px\">help -Category filter<\/p>\n<p>The command and associated information are shown in the image that follows.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2630.hsg-10-11-12-02.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2630.hsg-10-11-12-02.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>Keep in mind, that when using the <b>Category<\/b><i> <\/i>parameter to find Help information that are related to specific categories of commands, you still have access to the <b>Full<\/b><i>, <\/i><b>Detailed<\/b><i>, <\/i>and<i> <\/i><b>Examples<\/b><i> <\/i>switches. Therefore, the following commands also work.<\/p>\n<p style=\"padding-left: 30px\">help -Category filter &ndash;Examples<\/p>\n<p style=\"padding-left: 30px\">help -Category filter &ndash;Detailed<\/p>\n<p style=\"padding-left: 30px\">help -Category filter &ndash;Full<\/p>\n<p>To find where the filter resides, use the <b>Get-Command<\/b> cmdlet as shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; gcm haswmivalue<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">CommandType&nbsp;&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModuleName<\/p>\n<p style=\"padding-left: 30px\">&#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8212;&#8212;&#8212;-<\/p>\n<p style=\"padding-left: 30px\">Filter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HasWmiValue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HSGWMImoduleV6<\/p>\n<p>To search the <i>About <\/i>Help files, as opposed to the <i>Cmdlet<\/i> Help files, use the category <b>HelpFile<\/b><i>. <\/i>The following script illustrates a command to search the <i>About <\/i>Help files for articles related to operators as well as the output associated with the command.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; Get-Help -Category helpfile -name *operator*<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Category&nbsp; Module&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Synopsis<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8212;&#8212;&#8211;&nbsp; &#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">about_Arithmetic_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes t&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Assignment_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes h&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Comparison_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes t&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Logical_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes t&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes t&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Operator_Precedence&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lists the W&#8230;<\/p>\n<p style=\"padding-left: 30px\">about_Type_Operators&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelpFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Describes t&#8230;<\/p>\n<p>Join me tomorrow when I will talk about more cool Windows PowerShell 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><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use advanced features in the Windows PowerShell Get-Help cmdlet to quickly find PowerShell Help information. Microsoft Scripting Guy, Ed Wilson, is here. It seems that my schedule keeps getting fuller. Tonight is the Windows PowerShell User Group in Charlotte. We will be having a script club, so it should be a [&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":[51,362,3,45],"class_list":["post-4842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-getting-started","tag-powershell-3","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use advanced features in the Windows PowerShell Get-Help cmdlet to quickly find PowerShell Help information. Microsoft Scripting Guy, Ed Wilson, is here. It seems that my schedule keeps getting fuller. Tonight is the Windows PowerShell User Group in Charlotte. We will be having a script club, so it should be a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4842","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=4842"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4842\/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=4842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=4842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=4842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}