Page 1 of 1

Access help for script installed from PSRepository

Posted: Sun Dec 23, 2018 12:33 pm
WMF: 5.1
Windows 10 (latest)

Issue: I have written a script with comment based help. I verified the script as well as its comment based help (using get-help .\foo.ps1) before publishing it (had to migrate the comment based help into a <#psscriptinfo block) as well as associated modules to a PSRepository that was created on the local LAN (i.e., created a network share and used Register-PSRepository to register it as a repository). I then installed the modules and script (i.e., Install-Module -repository & Install-Script -repository) and things work fine...except I seem to be unable to access the comment based help in the installed script.

Note that after an install of the script from the PSRepository the script is executable using its name (no longer requires the path syntax as the script install makes it known to the engine). So using "get-help scriptname" only returns a one line parameter format information (i.e., get-help foo; foo.ps1 [-Verify] [-Info] [<CommonParameters>]). This is true even if I navigate into the installed folder (under C:\Program Files\PowerShell\Scripts) and use get-help with the .\ prefix.

I notice a difference between my base, unpublished script and its published counterpart in that the script metadata is now in a <#psscriptinfo comment block versus the older format of plain comment based help.

So my question becomes, how can I access comment based help that is within a <#pscriptinfo block once a publish script has been installed?


Re: Access help for script installed from PSRepository

Posted: Sun Dec 23, 2018 1:10 pm
by jvierra
Without your code it is not possible to guess at the issue. You can start by reading the following very carefully. ... ased-help/

I would also suggest creating a very simple module with one function and testing it until you find what you are doing that is causing the issue.