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

Update-Help doesn't install core About topics #2028

Closed
juneb opened this issue Aug 23, 2016 · 10 comments
Closed

Update-Help doesn't install core About topics #2028

juneb opened this issue Aug 23, 2016 · 10 comments
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-Fixed The issue is fixed. WG-Interactive-HelpSystem help infrastructure and formatting of help

Comments

@juneb
Copy link
Contributor

juneb commented Aug 23, 2016

When you run Update-Help in PowerShell Core 6.0.0.9 on Windows 10.0.14905, you get the XML help, and About help for CimCmdlets and Pester modules, but no core About help.

Steps to reproduce

In PowerShell 5.1: Start-Process 'C:\Program Files\PowerShell\6.0.0.9\powershell.exe' -Verb RunAs
In PowerShell 6.0.0.9 (elevated): Update-Help -Verbose

Expected behavior

Installs About topics in 'C:\Program Files\PowerShell\6.0.0.9\en-US' or somewhere else in 6.0.0.9.

Actual behavior

PS C:\Program Files\PowerShell\6.0.0.9> dir $pshome\* -Recurse -Include About*help.txt


    Directory: C:\Program Files\PowerShell\6.0.0.9\Modules\CimCmdlets\en-US


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        8/12/2015   2:56 PM           2601 about_CimSession.help.txt


    Directory: C:\Program Files\PowerShell\6.0.0.9\Modules\Pester\en-US


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        8/15/2016   1:49 PM           3110 about_BeforeEach_AfterEach.help.txt
-a----        8/15/2016   1:49 PM           6394 about_Mocking.help.txt
-a----        8/15/2016   1:49 PM           5052 about_Pester.help.txt
-a----        8/15/2016   1:49 PM           5215 about_should.help.txt
-a----        8/15/2016   1:49 PM           1156 about_TestDrive.help.txt

PS C:\Program Files\PowerShell\6.0.0.9> dir $pshome\* -Recurse -Include About_Aliases.help.txt
PS C:\Program Files\PowerShell\6.0.0.9>

Environment data

Name                           Value
----                           -----
PSRemotingProtocolVersion      2.3
PSEdition                      Core
SerializationVersion           1.1.0.1
PSVersion                      6.0.0-alpha
WSManStackVersion              3.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
CLRVersion
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.9
@NReilingh
Copy link

NReilingh commented Aug 30, 2016

I've been experiencing the same problem even in PS 5 -- Downloading the Windows 10 ISO as of three days ago and doing a fresh install gets you PowerShell 5.1 with these same help topics, and update-help -force doesn't download any more of them.

PS 4 (on a fresh Server 2012 R2 install) seems to include everything.

EDIT: I did another test and noted that 2012R2 (PS4) includes only a couple of about_ topics until Get-Help is run for the first time. Then it downloads the full set.

What I'm not clear on now is: How does Update-Help know what the core about topics are and where to find them? Is that what's missing between PS 4 and 5? The Update-Help documentation says it downloads help files for installed modules. Are the core about_ topics considered to be in a module, or is this something different? If so, which module is it, and could Update-Help request it specifically with -FullyQualifiedModule?

I'm trying to figure out how to fix this manually on my Windows 10 machine. Should it be possible for me to correct some kind of help manifest that is currently missing the the online locations for the core about topics?

@SteveL-MSFT SteveL-MSFT added Issue-Bug Issue has been identified as a bug in the product WG-Interactive-HelpSystem help infrastructure and formatting of help labels Sep 1, 2016
@kilasuit
Copy link
Collaborator

After looking at this earlier and looking between what the differences are between PowerShell v4 & v5+ (on 2012R2) it seems that the issue is that the help cab file for Microsoft.PowerShell.Core doesnt include the about_* topic files for WMF 5 has been installed

This means that machines that have had WMF4 & have had Update-Help run on them which were then upgraded to WMF5 (WinX -> Win10) will have the core about_* topics where as machines that started on WMF5+ are missing them (confirmed on 3 different Win10 builds, a 2012R2 machine updated to WMF5 & a 2012R2 machine updated to WMF5.1 Preview)

I have a fix for this which essentially has zipped up the about_* topics from a new 2012R2 build on Wmf4 that has then had Update-help run and made this zip file available at https://github.com/kilasuit/Install-AboutHelp & the Install-AboutHelp.ps1 is available on the PSGallery as well via Find-Script Install-AboutHelp

Ideally the cab file should be updated from the 5.0.7.0 version to 5.0.8.0 and re-include the about_* topic files
This also brings another point up about open sourcing these files as well cc @joeyaiello

@Liturgist
Copy link

Still not there in v6.0.0-alpha.10.

@SteveL-MSFT SteveL-MSFT added this to the 6.0.0 milestone Oct 28, 2016
@NReilingh
Copy link

Something that may be contributing to the get-help issues people (like me) are experiencing are that some help files are currently being downloaded by update-help as .txt instead of .help.txt, and those do not seem to be visible to get-help.

This great answer to a StackOverflow question I asked includes some neat instructions for correcting this locally. The same issue was also present for some module help files (like PSScheduledJobs), and once I combined this with @kilasuit's excellent solution, I think my help files are finally back to the level of functionality they had prior to WMF 5.

@kilasuit
Copy link
Collaborator

This is also an issue in Server 2016 too as well as still being an issue in the latest v6 alpha too.

@NReilingh
Copy link

I don't really have the expertise to say this with confidence, but it appears that as of today, update-help will pull down all of the missing about_* topics, as well as those for the PSScheduledJob and PSWorkflow modules, HOWEVER they will be missing the .help.txt extension (and so be unusable without additional tweaks), AND all of the text spacing and formatting in these files is completely broken compared to the WMF 4-era equivalents. Here's an excerpt from about_Execution_Policies:

9-30-2016:

USE GROUP POLICY TO MANAGE EXECUTION POLICY
    ------------------------------------------- You can use the "Turn on Script
    Execution" Group Policy setting to manage the execution policy of computers
    in your enterprise. The Group Policy setting overrides the execution
    policies set in Windows PowerShell in all scopes.
    The "Turn on Script Execution" policy settings are as follows:
    -- If you disable "Turn on Script Execution", scripts do not run. This is
    equivalent to the "Restricted" execution policy.
    -- If you enable "Turn on Script Execution", you can select an execution
    policy. The Group Policy settings are equivalent to the following execution
    policy settings.
    Group Policy                Execution Policy ------------               
    ---------------- Allow all scripts.          Unrestricted
    Allow local scripts         RemoteSigned and remote signed scripts.
    Allow only signed           AllSigned scripts.
    -- If "Turn on Script Execution" is not configured, it has no effect. The
    execution policy set in Windows PowerShell is effective.

9-30-2014

 USE GROUP POLICY TO MANAGE EXECUTION POLICY
 -------------------------------------------
    You can use the "Turn on Script Execution" Group Policy setting
    to manage the execution policy of computers in your enterprise. 
    The Group Policy setting overrides the execution policies set in Windows
    PowerShell in all scopes. 

    The "Turn on Script Execution" policy settings are as follows:

    -- If you disable "Turn on Script Execution", scripts do not run. 
       This is equivalent to the "Restricted" execution policy.

    -- If you enable "Turn on Script Execution", you can select an
       execution policy. The Group Policy settings are equivalent to
       the following execution policy settings.

        Group Policy                Execution Policy  
        ------------                ----------------
        Allow all scripts.          Unrestricted

        Allow local scripts         RemoteSigned
        and remote signed
        scripts. 

        Allow only signed           AllSigned
        scripts. 

    -- If "Turn on Script Execution" is not configured, it has no
       effect. The execution policy set in Windows PowerShell is
       effective.

Should a different bug be opened for this? The current version of this file on the web has the proper formatting.

@zjalexander
Copy link
Contributor

this should be fixed on Windows now

@kilasuit
Copy link
Collaborator

kilasuit commented Dec 8, 2016

@zjalexander - I can confirm that this is resolved from tests that I've done on a few new builds yesterday including Server 2016

@Liturgist
Copy link

Will this fix be in alpha.14?

@zjalexander
Copy link
Contributor

zjalexander commented Dec 8, 2016

@Liturgist the fix should be live right now - the underlying issue was with the help content, and totally independent of the PowerShell code. I just haven't gotten around to confirming it on PS Core yet :)

@joeyaiello joeyaiello added the Resolution-Fixed The issue is fixed. label May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-Fixed The issue is fixed. WG-Interactive-HelpSystem help infrastructure and formatting of help
Projects
None yet
Development

No branches or pull requests

7 participants