I frequently use comment based help in PowerShell and it always worked fabulous. However, today I encountered an issue.
If I use Get-Help Test.ps1 I get on some systems if the file is in some locations the following error, after “Searching for Help Test.ps1” popped up:
Get-Help : Get-Help could not find Test.ps1 in a help file in this session. To download updated help topics type: “Update-Help”. […]
The strange thing is: On my client, it doesn’t work on local drives or one network share. But the help works for the very same file on another network share.
But it is not only my client, I found at least one test server (plain Windows installation, no policies etc.) that has the same problem. Other servers I tried are working, no matter where the file is saved.
By now, all I can say is, that the comment based help is functional and does not contain any syntax errors, otherwise it wouldn’t work on any machine. Also: Execution of the scrip works always.
So, do you have any idea why PowerShell is not able to parse the help as demanded?