{"id":17818,"date":"2008-12-24T07:31:30","date_gmt":"2008-12-24T15:31:30","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17818"},"modified":"2019-06-07T07:33:25","modified_gmt":"2019-06-07T15:33:25","slug":"powershell-v2-external-maml-help","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/powershell-v2-external-maml-help\/","title":{"rendered":"PowerShell V2 \u2013 External MAML Help"},"content":{"rendered":"<p>As you\u2019ve probably picked up by now \u2013 Advanced Functions are super important. We&#8217;ve been showing a bunch of scripts that have embedded help using comments and dot-tags.  Let me take a second and drill into this.<\/p>\n<p>We believe that PS will be used in a wide range of; scenarios: simple one liners; personal ad hoc scripts; scripts you share with your friends; scripts you share with the community; scripts  you in your commercial product.  It is our goal to have a single mechanism with progressively richer and richer optional features to support this entire range of scenarios.    We\u2019ve been showing you the Community Help experience but we have also designed it so that commercial products can ship PS scripts.  In particular, we support the ability to have external MAML help which can be localized into multiple languages.  This is not implemented in CTP3 but we expect to support it in V2.<\/p>\n<p>Below is an excerpt from Refaat Issa\u2019s spec.<\/p>\n<p>Enjoy!<\/p>\n<p>Jeffrey Snover [MSFT]\nWindows Management Partner Architect\nVisit the Windows PowerShell Team blog at:    <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a>\nVisit the Windows PowerShell ScriptCenter at:  <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n<p><strong><span style=\"text-decoration: underline\">External MAML Help<\/span><\/strong><\/p>\n<p>When a full-fledged MAML file is required, or when localization into other languages is essential, a script author can add external MAML help to a function.<\/p>\n<p>Traditionally, MAML help files for cmdlets were packaged in the snap-in, along with the cmdlets themselves.  The snap-in installation process placed the MAML files into the folder $pshome\\en-US.  The culture-specific folder (en-US) varies according to the operating system\u2019s UI culture.<\/p>\n<p>Functions should not use the same folder to place their MAML files because $pshome requires administrative rights, which the script author may not have. However, the Get-Help language folder hierarchy and fallback mechanism will be used for functions as well.\nSyntax: .ExternalHelp C:\\MyScripts\\MyHelpfile.xmlThe external MAML help file name &amp; path are indicated in the ExternalHelp inline help directive.<\/p>\n<p>The argument value (C:\\MyScripts\\MyHelpfile.xml) is resolved in the following order:<\/p>\n<ul>\n<li>The file name is separated from the rest of the path.  This path becomes the starting folder. (C:\\MyScripts)<\/li>\n<li>The help system searches for a folder bearing the name of the operating system\u2019s UI culture, such as \u201cen-US\u201d or \u201cde-DE\u201d, under the starting folder. (C:\\MyScripts\\de-DE)<\/li>\n<li>If the specified MAML file is not found, then the \u201cVista language fallback\u201d logic is applied and the help system searches for a folder bearing the fallback language name, such as \u201cen\u201d or \u201cde\u201d. (C:\\MyScripts\\de)<\/li>\n<li>If the MAML file is still not found, then the starting folder is searched for the MAML file. (C:\\MyScripts\\MyHelpFile.xml)<\/li>\n<\/ul>\n<p>Notes:<\/p>\n<ul>\n<li>Spaces are allowed in the help file path<\/li>\n<li>.ExternalHelp can exist on its own as inline help, without the need for Synopsis \u2026 etc.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>As you\u2019ve probably picked up by now \u2013 Advanced Functions are super important. We&#8217;ve been showing a bunch of scripts that have embedded help using comments and dot-tags. Let me take a second and drill into this. We believe that PS will be used in a wide range of; scenarios: simple one liners; personal ad [&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":[137,194,210],"class_list":["post-17818","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-ctp3","tag-helpfile","tag-jeffrey-snover"],"acf":[],"blog_post_summary":"<p>As you\u2019ve probably picked up by now \u2013 Advanced Functions are super important. We&#8217;ve been showing a bunch of scripts that have embedded help using comments and dot-tags. Let me take a second and drill into this. We believe that PS will be used in a wide range of; scenarios: simple one liners; personal ad [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17818","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=17818"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17818\/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=17818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}