Access help for script installed from PSRepository

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 13
Joined: Fri Sep 05, 2008 4:35 am

Access help for script installed from PSRepository

Post by »

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?


Posts: 14618
Joined: Tue May 22, 2007 9:57 am
Answers: 3
Has voted: 1 time
Been upvoted: 3 times

Re: Access help for script installed from PSRepository

Post 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.