{"id":12609,"date":"2016-08-08T06:00:45","date_gmt":"2016-08-08T13:00:45","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=12609"},"modified":"2016-10-27T10:49:34","modified_gmt":"2016-10-27T17:49:34","slug":"writing-help-for-dynamic-parameters","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2016\/08\/08\/writing-help-for-dynamic-parameters\/","title":{"rendered":"Writing Help for Dynamic Parameters"},"content":{"rendered":"<p>Because dynamic parameters can be added to a command from multiple sources, the command author (who writes the help) cannot predict the dynamic parameters that might be available at runtime. Therefore, Get-Help expects dynamic parameters to be documented in the help file for the code that adds the dynamic parameters; not the code that has the dynamic parameters.<\/p>\n<p>This makes sense in theory, but, in practice, it&#8217;s not discoverable and it&#8217;s very confusing for users.<\/p>\n<p>To write help for the dynamic parameters that you add to cmdlets and functions, you need to sneak it into the description. I&#8217;ll show you how. The article ends with suggestions for making this process easier. I welcome your suggestions, too.<\/p>\n<p><a href=\"http:\/\/info.sapien.com\/index.php\/scripting\/scripting-help\/writing-help-for-dynamic-parameters\" target=\"_new\">Read the full post in the SAPIEN Information Center<\/a>.<\/p>\n<p><em>June Blender is a technology evangelist at SAPIEN Technologies, Inc. and a Windows PowerShell MVP. You can reach her at <span id=\"cloak33701\"><span id=\"cloak9078b420252769c443f9cc7f78816a07\"><a href=\"mailto:juneb@sapien.com\">juneb@sapien.com<\/a><\/span><\/span> or follow her on Twitter at <a href=\"https:\/\/twitter.com\/juneb_get_help\" target=\"_blank\">@juneb_get_help<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Because dynamic parameters can be added to a command from multiple sources, the command author (who writes the help) cannot predict the dynamic parameters that might be available at runtime. Therefore, Get-Help expects dynamic parameters to be documented in the help file for the code that adds the dynamic parameters; not the code that has [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2,1143,25],"tags":[904,450,966,1172],"class_list":["post-12609","post","type-post","status-publish","format-standard","hentry","category-general","category-powershell","category-windows-powershell","tag-comment-based-help","tag-help","tag-powershell-help","tag-xml-help"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=12609"}],"version-history":[{"count":4,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12609\/revisions"}],"predecessor-version":[{"id":12614,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12609\/revisions\/12614"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=12609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=12609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=12609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}