Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmdlet help not found #107

Open
3 tasks done
ThomasNieto opened this issue Apr 15, 2023 · 11 comments
Open
3 tasks done

Cmdlet help not found #107

ThomasNieto opened this issue Apr 15, 2023 · 11 comments

Comments

@ThomasNieto
Copy link

Prerequisites

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

Steps to reproduce

Install PSDesiredStateConfiguration module and update help. Then try to access any of cmdlet help and it will say no help found.

Expected behavior

# Help found

Actual behavior

# Help not found

Error details

No response

Environment data

7.4-preview2

Version

2.0.6

Visuals

No response

@ThomasNieto
Copy link
Author

cc: @sdwheeler

@sdwheeler
Copy link

@ThomasNieto I updated our redirection links. Let me know if that helped.

@ThomasNieto
Copy link
Author

@sdwheeler Sadly it did not, Update-Help cmdlet downloads the help and I can see it in ~\Documents\Help\PSDesiredStateConfiguration\2.0.6\en-US folder however, its like Get-Help can't find the help xml files.

PS C:\Users\Thomas> update-Help psdesiredstateconfiguration -Verbose -Force
VERBOSE: Resolving URI: "https://aka.ms/powershell70-help"
VERBOSE: Your connection has been redirected to the following URI: "https://pshelpprod.blob.core.windows.net/cabinets/powershell-7/"
VERBOSE: Performing the operation "Update-Help" on target "PSDesiredStateConfiguration, Current Version: 7.0.1.0, Available Version: 7.0.1.0, UICulture: en-US".
VERBOSE: PSDesiredStateConfiguration: Updated C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US\about_Classes_and_DSC.help.txt. Culture en-US Version 7.0.1.0
VERBOSE: PSDesiredStateConfiguration: Updated C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US\Microsoft.Windows.DSC.CoreConfProviders.dll-help.xml. Culture en-US Version 7.0.1.0
VERBOSE: PSDesiredStateConfiguration: Updated C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US\PSDesiredStateConfiguration-help.xml. Culture en-US Version 7.0.1.0
PS C:\Users\Thomas> Get-DscResource -?

NAME
    Get-DscResource

SYNTAX
    Get-DscResource [[-Name] <string[]>] [[-Module] <Object>] [-Syntax] [<CommonParameters>]


ALIASES
    None


REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        -- To download and install Help files for the module that includes this cmdlet, use Update-Help.
        -- To view the Help topic for this cmdlet online, type: "Get-Help Get-DscResource -Online" or
           go to http://go.microsoft.com/fwlink/?LinkId=403985.

PS C:\Users\Thomas> Get-Command Get-DscResource

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Get-DscResource                                    2.0.6      PSDesiredStateConfiguration

PS C:\Users\Thomas> ls C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US

    Directory: C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          12/13/2021 10:12 PM          24117 about_Classes_and_DSC.help.txt
-a---          12/13/2021 10:12 PM          10540 Microsoft.Windows.DSC.CoreConfProviders.dll-help.xml
-a---          12/13/2021 10:12 PM          20293 PSDesiredStateConfiguration-help.xml

@sdwheeler
Copy link

Aha, I understand the problem. You have a previous version of the help downloaded that is pointing to the old storage location. We moved DSC the content to a new location when it was migrated out of the PowerShell-Docs repo. If you delete the existing help files from C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US then run Update-Help it should work.

@ThomasNieto
Copy link
Author

ThomasNieto commented Apr 15, 2023

Strange still didn't work, I deleted both the module and help for a clean slate.

PS C:\Users\Thomas> Install-PSResource psDesiredStateConfiguration -PassThru

Name                        Version Prerelease Repository Description
----                        ------- ---------- ---------- -----------
PSDesiredStateConfiguration 2.0.6              PSGallery  PowerShell Desired State Configuration

PS C:\Users\Thomas> Update-Help psdesiredstateconfiguration -Verbose -Force
VERBOSE: Resolving URI: "https://aka.ms/powershell72-help"
VERBOSE: Your connection has been redirected to the following URI: "https://pshelpprod.blob.core.windows.net/cabinets/powershell-7.2/"
VERBOSE: Performing the operation "Update-Help" on target "PSDesiredStateConfiguration, Current Version: 0.0.0.0, Available Version: 7.2.0.0, UICulture: en-US".
VERBOSE: PSDesiredStateConfiguration: Updated C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US\about_Classes_and_DSC.help.txt. Culture en-US Version 7.2.0.0
VERBOSE: PSDesiredStateConfiguration: Updated C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US\PSDesiredStateConfiguration-help.xml. Culture en-US Version 7.2.0.0
PS C:\Users\Thomas> Get-DscResource -?

NAME
    Get-DscResource

SYNTAX
    Get-DscResource [[-Name] <string[]>] [[-Module] <Object>] [-Syntax] [<CommonParameters>]


ALIASES
    None


REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        -- To download and install Help files for the module that includes this cmdlet, use Update-Help.
        -- To view the Help topic for this cmdlet online, type: "Get-Help Get-DscResource -Online" or
           go to http://go.microsoft.com/fwlink/?LinkId=403985.

PS C:\Users\Thomas> ls C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US

    Directory: C:\Users\Thomas\Documents\PowerShell\Help\PSDesiredStateConfiguration\2.0.6\en-US

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           6/22/2021 10:16 PM          24117 about_Classes_and_DSC.help.txt
-a---           6/22/2021 10:16 PM          31227 PSDesiredStateConfiguration-help.xml

@sdwheeler
Copy link

Also, delete the PSDesiredStateConfiguration_779e0998-8c72-4567-89b5-49313fc15351_HelpInfo.xml file from the module folder before you run Update-Help.

@sdwheeler
Copy link

I found 2 more redirects that needed fixing. Deleting and reinstalling the module should fix Update-Help now. If not, then I will have to try more debugging on Monday.

@ThomasNieto
Copy link
Author

The help info file was deleted along with the en-us directory and forcing the help to update still didn't resolve. Thanks for taking a look at it over the weekend.

@ThomasNieto
Copy link
Author

Found a workaround, if you copy the en-US folder from the help directory into the module directory it will work. That makes it seem like a Get-Help bug.

@sdwheeler
Copy link

Ah... I think we have run into that before. There may be an issue open in the PowerShell repo. If not, we need to open one.

@sdwheeler
Copy link

@ThomasNieto I found the related bug - See PowerShell/PowerShell#18397

You should find it familiar. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants