{"id":12251,"date":"2011-10-29T00:01:00","date_gmt":"2011-10-29T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2011\/10\/29\/modify-powershell-comment-based-help-to-display-function-use\/"},"modified":"2011-10-29T00:01:00","modified_gmt":"2011-10-29T00:01:00","slug":"modify-powershell-comment-based-help-to-display-function-use","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/modify-powershell-comment-based-help-to-display-function-use\/","title":{"rendered":"Modify PowerShell Comment-Based Help to Display Function Use"},"content":{"rendered":"<p><span style=\"font-family: Segoe;font-size: small\"><span><strong>Summary:<\/strong> In the final version of my Windows PowerShell WMI helper module, I add aliases and modify comment-based help to find roles of functions.<\/span><\/span><\/p>\n<\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">Microsoft Scripting Guy Ed Wilson here. It is the weekend, at least in Charlotte, North Carolina, in the United States. I have had a lot of fun working on my WMI helper module this week, and the last thing I need to do is to add a few aliases, and add the function <b>description<\/b> attribute using a technique I recently came up with. Today, I am up to version 6 on my <b>HSGWMIModule<\/b> module. <\/span><\/p>\n<blockquote>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><span><b>Note<\/b> This is part six of a multipart article on developing a WMI helper module. On <\/span><\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/10\/24\/a-powershell-wmi-helper-module-described.aspx\"><span style=\"font-family: Segoe\">Monday<\/span><\/a><span style=\"font-family: Segoe\">, I created the base WMI module, and included a couple of really great functions that query the WMI schema and return WMI class methods and properties. On <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/10\/25\/use-powershell-to-easily-find-the-key-property-of-a-wmi-class.aspx\"><span style=\"font-family: Segoe\">Tuesday<\/span><\/a><span style=\"font-family: Segoe\">, I added a function that returns the key property of a WMI class. This is useful when working with WMI instance methods. On <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/10\/26\/use-a-powershell-function-to-get-wmi-key-property-values.aspx\"><span style=\"font-family: Segoe\">Wednesday<\/span><\/a><span style=\"font-family: Segoe\">, I created a function that will return the values of those key properties. On <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/10\/27\/easily-filter-empty-wmi-properties-in-powershell.aspx\"><span style=\"font-family: Segoe\">Thursday<\/span><\/a><span style=\"font-family: Segoe\">, I added a <b>HasWMIValue<\/b> filter to the module. <a title=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/10\/28\/query-wmi-classes-by-using-powershell-and-wildcard-patterns.aspx\" href=\"http:\/\/blogs.technet.com\/controlpanel\/blogs\/posteditor.aspx\/Yesterday\">Yesterday<\/a>, I added two functions. The first is a function that will query WMI classes using a wildcard character pattern. The second function is an <b>Out-TempFile<\/b> function that accepts piped input and displays results in a temporary text file in Notepad. <\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><span><b>Another Note<\/b> The version six of my <b>HSGWMIModule<\/b> is available on the <\/span><\/span><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/WMI-Helper-Module-for-90e4f22e\"><span style=\"font-family: Segoe\">Scripting Guys Script Repository<\/span><\/a><span style=\"font-family: Segoe\">.<\/span><\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">On May 28, 2011, I wrote a Hey, Scripting Guy! Blog post called <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/05\/28\/learn-how-to-use-description-attributes-in-powershell-functions.aspx?CommentPosted=true#commentmessage\"><span style=\"font-family: Segoe\">Learn How to Use Description Attributes in PowerShell Functions<\/span><\/a><span style=\"font-family: Segoe\"><span><i> <\/i>in which I talked about using the rather finicky <b>[system.compomentmodel.description]<\/b> attribute. It does not play well with comment-based help, and it has a tendency to error out for no apparent reason. In that article, I also talk about finding functions that come from various modules, so the article is useful. <\/span><\/span><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">On the other hand, I was not extremely happy with the solution. I was playing around looking at the members of a function, and I noticed something&mdash;there is a <b>description<\/b> property; the same property exists for variables, aliases, and other things. The <b>description<\/b> property of a function appears in the following figure.<\/span><\/p>\n<p><span style=\"font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5050.hsg-10-29-11-01_5AA0B355.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px\" title=\"Image of description property of a function\" border=\"0\" alt=\"Image of description property of a function\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4466.hsg-10-29-11-01_thumb_3F1BB152.png\" width=\"504\" height=\"356\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">The difference is that when creating a new variable with the <b>New-Variable<\/b> cmdlet or the <b>New-Alias<\/b> cmdlet, the <i>description <\/i>parameter is directly exposed. I have not figured out a way to do this for a function&mdash;until now. In the same way that I create a function and then add an alias, I can create a function and then add a description to it. The secret is to use the <b>Get-Command<\/b> cmdlet to return a <b>functioninfo<\/b> object; from the <b>functioninfo<\/b><i> <\/i>object, I can directly add the description to the function. The command to add a description to a function is shown here:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">(Get-Command testfunction).description = &#8220;my mred function&#8221;<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\"><span>In the following figure, I create a function, and then assign a description to it. Once I have done that, I use the <b>Get-Item<\/b> cmdlet and pipe the results to the <b>Format-List<\/b> to display the newly added <b>description<\/b><i>.<\/i><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3806.hsg-10-29-11-02_508C122A.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px\" title=\"Image of creating function and assigning description\" border=\"0\" alt=\"Image of creating function and assigning description\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8255.hsg-10-29-11-02_thumb_37240EF0.png\" width=\"504\" height=\"356\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">Okay, enough theory. I want to create aliases for all of the functions exposed by my <b>HSGWMImoduleV5<\/b> (I will add the aliases and the function descriptions in <b>HSGWMImoduleV6<\/b>). The first thing I need to do is find out which functions reside in the module. To do that, I import the module, and then use the <b>Get-Command<\/b> cmdlet to retrieve the functions. These two commands and their associated output are shown here:<\/span><\/p>\n<blockquote>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">PS C:\\Users\\ed.IAMMRED&gt; Import-Module hsg*5<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">PS C:\\Users\\ed.IAMMRED&gt; Get-Command -Module hsg*5<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">&nbsp;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"color: #000000;font-size: small\"><span style=\"font-family: Segoe\"><span><span style=\"text-decoration: underline\">CommandType<\/span><span>&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"text-decoration: underline\">Name<\/span><span>&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"text-decoration: underline\">Definition<\/span><\/span><\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WmiClassesAndQuery<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WMIClassesWithQualifiers<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WmiClassMethods<span>&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WmiClassProperties<span>&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WmiKey<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Get-WmiKeyvalue<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Filter<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>HasWmiValue<span>&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>New-Underline<span>&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8230;<\/span><\/span><\/p>\n<p style=\"line-height: 13.25pt;list-style-type: disc;margin: 0in 0in 8pt 0.5in\" class=\"MsoNormal\"><span style=\"font-size: small\"><span style=\"color: #000000;font-family: Segoe\">Function<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Out-TempFile<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>begin {&#8230;<\/span><\/span><\/p>\n<\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">One thing that makes it easier to add the aliases and the function descriptions is to load the <b>HSGWMImoduleV5<\/b> via the <b>Import-Module<\/b> cmdlet into the Windows PowerShell ISE. This simple action permits me to take advantage of tab expansion, which is a good thing given the length of some of the WMI function names. However, the long names also take advantage of one of my Windows PowerShell best practices of using a descriptive name for the function and shortening the name with an alias. <\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">After the changes are made to the new <b>HSGWMImoduleV6<\/b>, I save it to my working directory. Next, I remove the <b>HSGWMImoduleV5<\/b> from memory by using the <b>Remove-Module<\/b> cmdlet as shown here:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Remove-Module hsg*<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">I peruse the <b>function: drive<\/b> to ensure that all of my WMI functions successfully unloaded. To do this, I use <b>dir<\/b> command (alias for the <b>Get-Childitem<\/b> cmdlet) on the function drive. This command is shown here:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">dir function:<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Now I import my newly revised <b>HSGWMImoduleV6<\/b>. <\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I decided to use two fields in comment-based help that are not used by any cmdlets. I found these by examining the results from <b>Get-Help<\/b> by piping it to <b>Get-Member<\/b>. This command is shown in the following figure.<\/span><\/p>\n<p><span style=\"font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8171.hsg-10-29-11-03_2F989F83.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px\" title=\"Image of piping Get-Help results to Get-Member\" border=\"0\" alt=\"Image of piping Get-Help results to Get-Member\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8267.hsg-10-29-11-03_thumb_2F2C6C8E.png\" width=\"504\" height=\"358\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">By adding the two attributes, I can use <b>Get-Help<\/b> to filter out my functions. First, I can filter out all of my functions by using <b>Get-Help<\/b>:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Get-Help * | ? {$_.role}<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">To find only the functions that work with WMI metadata, I use the value <b>meta<\/b> in the syntax that is shown here:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Get-Help * | ? {$_.role -match &#8216;meta&#8217;}<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">To find the helper functions, I use the value <b>helper<\/b><i> <\/i>in the following command:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Get-Help * | ? {$_.role -match &#8216;helper&#8217;}<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">To find the query commands, I use this query:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Get-Help * | ? {$_.role -match &#8216;query&#8217;}<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">The commands and associated output are shown in the following figure.<\/span><\/p>\n<p><span style=\"font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4861.hsg-10-29-11-04_6E1DED29.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px\" title=\"Image of commands and associated output\" border=\"0\" alt=\"Image of commands and associated output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7674.hsg-10-29-11-04_thumb_3BBA19AA.png\" width=\"504\" height=\"366\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">The syntax of one of these comment-based help functions will suffice for you to get the idea. Here are the two new parameters I added to the help:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">.Role<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">Meta<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">.Component<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">HSGWMIModuleV6<\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">I placed these beneath the <b>parameter<\/b><i> <\/i>section and above the <b>notes<\/b><i> <\/i>section. This is shown in the following figure.<\/span><\/p>\n<p><span style=\"font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1234.hsg-10-29-11-05_08EA1336.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px\" title=\"Image of two new parameters beneath parameter section\" border=\"0\" alt=\"Image of two new parameters beneath parameter section\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4477.hsg-10-29-11-05_thumb_738C5DCD.png\" width=\"504\" height=\"366\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I created aliases for all the commands in the module. To find all the aliases, use this command:<\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: Segoe;font-size: small\">Get-Command -Module hsg*6 -CommandType function | % {Get-Alias -Definition $_.name}<\/span><\/p>\n<\/p>\n<\/blockquote>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">That&rsquo;s it for my WMI Helper module. I have uploaded version 6 to the <\/span><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/WMI-Helper-Module-for-90e4f22e\"><span style=\"font-family: Segoe\">Scripting Guys Script Repository<\/span><\/a><span style=\"font-family: Segoe\">. If there are other things you would like to see in my module, let me know via email at <\/span><a href=\"mailto:scripter@microsoft.com\"><span style=\"font-family: Segoe\">scripter@microsoft.com<\/span><\/a><span style=\"font-family: Segoe\">.<\/span><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">WMI Week will continue tomorrow when I will talk about an easy way to use WMI association classes. <\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">I invite you to follow me on <\/span><a href=\"http:\/\/bit.ly\/scriptingguystwitter\"><span style=\"font-family: Segoe\">Twitter<\/span><\/a><span style=\"font-family: Segoe\"> and <\/span><a href=\"http:\/\/bit.ly\/scriptingguysfacebook\"><span style=\"font-family: Segoe\">Facebook<\/span><\/a><span style=\"font-family: Segoe\">. If you have any questions, send email to me at <\/span><a href=\"mailto:scripter@microsoft.com\"><span style=\"font-family: Segoe\">scripter@microsoft.com<\/span><\/a><span style=\"font-family: Segoe\">, or post your questions on the <\/span><a href=\"http:\/\/bit.ly\/scriptingforum\"><span style=\"font-family: Segoe\">Official Scripting Guys Forum<\/span><\/a><span style=\"font-family: Segoe\">. See you tomorrow. Until then, peace.<\/span><\/span><\/p>\n<\/p>\n<p><span style=\"font-size: small\"><b><span style=\"font-family: Segoe\">Ed Wilson, Microsoft Scripting Guy<\/span><\/b><\/span><\/p>\n<\/p>\n<p><span style=\"font-size: small\"><strong><span style=\"font-family: Segoe\">&nbsp;<\/span><\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: In the final version of my Windows PowerShell WMI helper module, I add aliases and modify comment-based help to find roles of functions. Microsoft Scripting Guy Ed Wilson here. It is the weekend, at least in Charlotte, North Carolina, in the United States. I have had a lot of fun working on my WMI [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[52,3,4,45,6],"class_list":["post-12251","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-modules","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-wmi"],"acf":[],"blog_post_summary":"<p>Summary: In the final version of my Windows PowerShell WMI helper module, I add aliases and modify comment-based help to find roles of functions. Microsoft Scripting Guy Ed Wilson here. It is the weekend, at least in Charlotte, North Carolina, in the United States. I have had a lot of fun working on my WMI [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12251","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\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=12251"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12251\/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=12251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=12251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=12251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}