PowerShell ExternalHelp
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.
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.
PowerShell ExternalHelp
I'm having an issue using ExternalHelp and cannot figure what I'm doing wrong. I'm using PowerShell Studio 2018 to create my PowerShell Script Module and PowerShell HelpWriter 2018 to write my help documentation. The XML file generated by PowerShell HelpWriter is in the en-US sub directory of my PowerShell script module, however, Get-Help will not return the help from the XML file. If I specify the full path to the XML file in the ExternalHelp comment, it works, but if I specify just the XML file name, it does not. Any help would be greatly appreciated.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: PowerShell ExternalHelp
[Moved to correct forum by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PowerShell ExternalHelp
This might also be helpful. Naming and other issues for external help is required.
https://info.sapien.com/index.php/scrip ... -functions
https://info.sapien.com/index.php/scrip ... -functions
Re: PowerShell ExternalHelp
This is what I've done:
Module name is MyFirstModule
Module directory is D:\MyFirstModule
Help file name D:\MyFirstModule\en-US\MyFirstModule.psm1-Help.xml
My module is comprised of a .PSD1, a .PSM1 and several .PS1 files. The .PSM1 file is emply. The .PSD1 uses the NestModules array to include all the .PS1 files. Each .PS1 file contains a single function and the first comment (above function) is # .ExternalHelp MyFirstModule.psm1-Help.xml. I don't have code in the .PSM1 file because I want to make it easier to manage my functions by keeping them in separate files.
If I replace # .ExternalHelp MyFirstModule.psm1-Help.xml with # .ExternalHelp D:\MyFirstModule\en-US\MyFirstModule.psm1-Help.xml
then the help works without issue.
Module name is MyFirstModule
Module directory is D:\MyFirstModule
Help file name D:\MyFirstModule\en-US\MyFirstModule.psm1-Help.xml
My module is comprised of a .PSD1, a .PSM1 and several .PS1 files. The .PSM1 file is emply. The .PSD1 uses the NestModules array to include all the .PS1 files. Each .PS1 file contains a single function and the first comment (above function) is # .ExternalHelp MyFirstModule.psm1-Help.xml. I don't have code in the .PSM1 file because I want to make it easier to manage my functions by keeping them in separate files.
If I replace # .ExternalHelp MyFirstModule.psm1-Help.xml with # .ExternalHelp D:\MyFirstModule\en-US\MyFirstModule.psm1-Help.xml
then the help works without issue.
Re: PowerShell ExternalHelp
Unfortunately, that is not working for me for some reason. I placed the module in the $env:USERPROFILE\Documents\WindowsPowerShell\Modules folder under a subfolder with the same name as the module and still help does not come up.