{"id":1841,"date":"2014-02-04T16:26:58","date_gmt":"2014-02-04T16:26:58","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2014\/02\/04\/how-to-enable-updatable-help-for-your-powershell-module\/"},"modified":"2019-02-18T13:05:24","modified_gmt":"2019-02-18T20:05:24","slug":"how-to-enable-updatable-help-for-your-powershell-module","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/how-to-enable-updatable-help-for-your-powershell-module\/","title":{"rendered":"How to enable Updatable Help for your PowerShell Module"},"content":{"rendered":"<p>PowerShell 3.0 lets the user update Help content on a per module basis. In this article, I will explain how you can enable this for your own PowerShell module. <\/p>\n<p>Prerequisites: Have a new (script\/binary) module, help content for the cmdlets of the module, and a server where the help content is located. For this particular exercise I will be using a script module. <\/p>\n<p>Here is how my module is organized:<\/p>\n<p>C:\\Users\\frangom\\Documents\\WindowsPowerShell\\modules\\TestModule\\TestModule.psm1<\/p>\n<p>C:\\Users\\frangom\\Documents\\WindowsPowerShell\\modules\\TestModule\\TestModule.psd1<\/p>\n<p>TestModule.psm1 is my script module. There, I defined the name of help file.<\/p>\n<\/p>\n<p>TestModule.psd1 is the module manifest for my module. The HelpInfoURI field is the address where the help content for this module is located.<\/p>\n<p>On the server site, we have:<\/p>\n<ul>\n<li>The .cab file which contains the dll-Help.xml or the psm1-Help.xml file<\/li>\n<li>The HelpInfo.xml file.<\/li>\n<\/ul>\n<p>The .cab file must be named as follows:<\/p>\n<blockquote>\n<p><i><font color=\"#0000ff\">ModuleName<\/font><\/i>_<i><font color=\"#800000\">ModuleGUID<\/font><\/i> _<i><font color=\"#008000\">UI-Culture<\/font><\/i>_HelpContent.cab<\/p>\n<\/blockquote>\n<p>where:<\/p>\n<p><i><font color=\"#0000ff\">ModuleName<\/font><\/i>: The name of the module (same as the module manifest file).<\/p>\n<p><i><font color=\"#800000\">ModuleGUID<\/font><\/i>: The module GUID as referenced in the module manifest.<\/p>\n<p><font color=\"#008000\"><i>UI-Culture<\/i>:<\/font> The four letter hyphenated UI culture abbreviation (en-US, fr-FR, de-DE, etc.).<\/p>\n<p><i>HelpContent<\/i>: Indicates that this cab contains the help content file.<\/p>\n<\/p>\n<p>For example:<\/p>\n<p>TestModule_d03c1cf3-f738-48a3-b845-5ead46a52671_en-US_HelpContent.cab<\/p>\n<\/p>\n<p>Similarly, the HelpInfo file must adhere to the following naming convention:<\/p>\n<blockquote>\n<p><i><font color=\"#0000ff\">ModuleName<\/font><\/i>_<i><font color=\"#800000\">ModuleGUID<\/font><\/i>_HelpInfo.xml<\/p>\n<\/blockquote>\n<p>where:<\/p>\n<p><i><font color=\"#0000ff\">ModuleName<\/font><\/i>: Name of the module (same as the module manifest file).<\/p>\n<p><i><font color=\"#800000\">ModuleGUID<\/font><\/i>: Module GUID as referenced in the module manifest.<\/p>\n<p>HelpInfo: Indicates that this is the help info file.<\/p>\n<\/p>\n<p>For example:<\/p>\n<p>TestModule_d03c1cf3-f738-48a3-b845-5ead46a52671_HelpInfo.xml<\/p>\n<p>File content of the HelpInfo.xml file:<\/p>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&lt;<\/span><span>?xml<\/span><span> <span style=\"color: red\">version<\/span>=<span style=\"color: blue\">&quot;<\/span><span style=\"color: darkblue\">1.0<\/span><span style=\"color: blue\">&quot;<\/span> <span style=\"color: red\">encoding<\/span>=<span style=\"color: blue\">&quot;<\/span><span style=\"color: darkblue\">utf-8<\/span><span style=\"color: blue\">&quot;<\/span><span style=\"color: red\">?<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&lt;<\/span><span>HelpInfo<\/span><span> <span style=\"color: red\">xmlns<\/span>=<span style=\"color: blue\">&quot;<\/span><span style=\"color: darkblue\">http:\/\/schemas.microsoft.com\/powershell\/help\/2010\/05<\/span><span style=\"color: blue\">&quot;<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160; <span style=\"color: darkblue\">&lt;<\/span><span style=\"color: darkred\">HelpContentURI<\/span><span style=\"color: darkblue\">&gt;<\/span><span style=\"background: yellow\">http:\/\/www.mysite.com\/PSHelpContent\/<\/span><span style=\"color: darkblue\">&lt;\/<\/span><span style=\"color: darkred\">HelpContentURI<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160; <span style=\"color: darkblue\">&lt;<\/span><span style=\"color: darkred\">SupportedUICultures<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160;&#160;&#160;&#160; <span style=\"color: darkblue\">&lt;<\/span><span style=\"color: darkred\">UICulture<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160;&#160;&#160;&#160;&#160;&#160; <span style=\"color: darkblue\">&lt;<\/span><span style=\"color: darkred\">UICultureName<\/span><span style=\"color: darkblue\">&gt;<\/span>en-US<span style=\"color: darkblue\">&lt;\/<\/span><span style=\"color: darkred\">UICultureName<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160;&#160;&#160;&#160;&#160;&#160; <span style=\"color: darkblue\">&lt;<\/span><span style=\"color: darkred\">UICultureVersion<\/span><span style=\"color: darkblue\">&gt;<\/span>3.2.15.0<span style=\"color: darkblue\">&lt;\/<\/span><span style=\"color: darkred\">UICultureVersion<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160;&#160;&#160;&#160; <span style=\"color: darkblue\">&lt;\/<\/span><span style=\"color: darkred\">UICulture<\/span><span style=\"color: darkblue\">&gt;<\/span>&#160;&#160;&#160;&#160; <\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160; <span style=\"color: darkblue\">&lt;\/<\/span><span style=\"color: darkred\">SupportedUICultures<\/span><span style=\"color: darkblue\">&gt;<\/span><\/span><\/p>\n<p class=\"MsoNoSpacing\"><span>&lt;\/<\/span><span>HelpInfo<\/span><span>&gt;<\/span><\/p>\n<\/p><\/div>\n<p>Note: The HelpContentURI (in yellow) should point to a container.<\/p>\n<\/p>\n<p>Place these two files in the server folder PSHelpContent, e.g., <a href=\"\/\/\\\\mysite\\c$\\Inetpub\\wwwroot\\PSHelpContent\">\\\\mysite\\c$\\Inetpub\\wwwroot\\PSHelpContent\\<\/a><\/p>\n<p><b><\/b><\/p>\n<p><b>How to Test Updatable Help for Your Module<\/b><\/p>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span># First, make sure updatable help works using the -SourcePath<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>Update-Help<\/span><span> <span style=\"color: navy\">-Module<\/span> <span style=\"color: blueviolet\">TestModule<\/span> <span style=\"color: navy\">-SourcePath<\/span> <span style=\"color: blueviolet\">\\\\mysite\\c$\\Inetpub\\wwwroot\\PSHelpContent\\<\/span> <span style=\"color: navy\">-Force<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span>&#160;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span># After that, you can use without the -SourcePath which will connect to the site defined in<\/span><span>&#160;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"line-height: normal;margin-bottom: 0pt\"><span># the module manifest, HelpInfoURI = &#8216;http:\/\/www.mysite.com\/PSHelpContent\/&#8217;<\/span><\/p>\n<p class=\"MsoNoSpacing\"><span>Update-Help<\/span><span> <span style=\"color: navy\">-Module<\/span> <span style=\"color: blueviolet\">TestModule<\/span> <span style=\"color: navy\">-Force<\/span><\/span><\/p>\n<p class=\"MsoNormal\">\n<\/p><\/div>\n<p> <\/p>\n<p>For more information on Supporting Updatable Help, please visit <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=391422\">http:\/\/go.microsoft.com\/fwlink\/?LinkId=391422<\/a>.<\/p>\n<\/p>\n<p> <\/p>\n<p>Cheers,<\/p>\n<p>Francisco Gamino <\/p>\n<p>PowerShell Test Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell 3.0 lets the user update Help content on a per module basis. In this article, I will explain how you can enable this for your own PowerShell module. Prerequisites: Have a new (script\/binary) module, help content for the cmdlets of the module, and a server where the help content is located. For this particular [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[142,150,248,251,345,348],"class_list":["post-1841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-desired-state-configuration","tag-dsc","tag-powershell","tag-powershell-4-0","tag-windows-powershell-4-0","tag-windows-powershell-desired-state-configuration"],"acf":[],"blog_post_summary":"<p>PowerShell 3.0 lets the user update Help content on a per module basis. In this article, I will explain how you can enable this for your own PowerShell module. Prerequisites: Have a new (script\/binary) module, help content for the cmdlets of the module, and a server where the help content is located. For this particular [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=1841"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1841\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=1841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=1841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=1841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}