platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

WARNING: [GetHelpFileName] Cannot find module for command with ConfigMgr module

Open aczechowski opened this issue 2 years ago • 4 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] Search the existing issues.

Steps to reproduce

  1. Install Configuration Manager console.
  2. Install PlatyPS 0.14.2
  3. Import-Module ConfigurationManager
  4. Import-Module platyps
  5. Splat parameters:
    $parameters = @{
    Path = 'c:\Users\aaroncz\git\sccm-docs-powershell\sccm-ps\ConfigurationManager'
    LogPath = 'c:\Users\aaroncz\platyps\ConfigurationManager\20210727.txt'
    RefreshModulePage = $true
    AlphabeticParamsOrder = $true
    UpdateInputOutput = $true
    ExcludeDontShow = $true
    Encoding = [System.Text.Encoding]::UTF8
    }
    
  6. Update-MarkdownHelpModule @parameters

Expected behavior

PlatyPS runs normally for cmdlets in both AdminUI.PS.dll (~1040 cmdlets) and AdminUI.PS.psm1 (~130 cmdlets)

Actual behavior

For all ~130 cmdlets in AdminUI.PS.psm1, PlatyPS returns the following error:

`WARNING: [GetHelpFileName] Cannot find module for command 'Remove-CMUserCollectionQueryMembershipRule'`

And it removes the **external help file** value from the cmdlet article metadata

Reference #528, which was closed when this issue was supposed to be fixed in 0.14.2.

Error details

No response

Environment data

PS C:\WINDOWS\system32>  get-module platyPs -ListAvailable


    Directory: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.14.2     platyPS                             {New-MarkdownHelp, Get-MarkdownMetadata, New-ExternalHelp,...
Script     0.14.0     platyPS                             {New-MarkdownHelp, Get-MarkdownMetadata, New-ExternalHelp,...


PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22000.653
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22000.653
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visuals

Example of diff in VSCode showing external help file value change:

image

aczechowski avatar May 31 '22 18:05 aczechowski

Thanks @aczechowski for reporting this. We are investigating why the original fix https://github.com/PowerShell/platyPS/pull/542 is not working in this situation.

theJasonHelmick avatar Jun 20 '22 17:06 theJasonHelmick

@aczechowski - Can you supply us with the module manifest for Config manager - AdminUI.PS.PSD1.

theJasonHelmick avatar Jun 20 '22 17:06 theJasonHelmick

@aczechowski We tried to repro the issue using a test environment provided by Megan. We could not reproduce the problem.

Please ensure the loaded version of platyPS is 0.14.2 and let us know if you still have the issue.

adityapatwardhan avatar Jun 20 '22 21:06 adityapatwardhan

We need to validate the new version against the SCCM modules.

sdwheeler avatar May 24 '24 15:05 sdwheeler