How do I format and name the examples in my PowerShell script documentation? -
i apply same style of documentation script examples scripts demonstrated in native documentation. example, consider invoke-command
command.
get-help invoke-command -examples
the output of command contains following:
example 3: run command in persistent connection ps c:\>$s = new-pssession -computername server02 -credential domain01\user01 ps c:\> invoke-command -session $s -scriptblock {get-culture}
how name examples appear above instead of default -------------------------- example 3 --------------------------
header? latter rendered when using .example
directive in documentation tag.
furthermore, how can leverage multi-line examples include shell path prefix (ps c:\?
). can manually enter prefix in documentation create effect wondering if there different , more compliant method.
the way external maml xml file. either created hand, or utilizing platyps module create maml markdown. can use platyps create markdown comment based (cbh).
using platyps:
# create markdown cbh in module new-markdownhelp -module mymodule -outputfolder .\docs -locale en-us # create maml external help, in build step new-externalhelp -path .\docs -outputpath .\moduleoutfolder\en-us # can optionally replace cbh link external # file need adjust markdown <# .externalhelp mymodulename-help.xml #>
when creating initial markdown, have manually adjust markdown multi line examples. reason , few other preference differences maintain markdown , replace cbh.
Comments
Post a Comment