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

Windows Update does not fresh-install Preview 7 #15692

Closed
5 tasks done
ghost opened this issue Jun 29, 2021 · 7 comments
Closed
5 tasks done

Windows Update does not fresh-install Preview 7 #15692

ghost opened this issue Jun 29, 2021 · 7 comments
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.

Comments

@ghost
Copy link

ghost commented Jun 29, 2021

Prerequisites

Steps to reproduce

Follow steps based on Preview updating PowerShell 7.2 with Microsoft Update:

Ensure PowerShell 7.1.3 is installed but no PowerShell preview releases are installed.

Create registry values [HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShellCore]UseMU:dword=1 and [HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShellCore\InstalledVersions\39243d76-adaf-42b1-94fb-16ecf83237c8]Install:dword=1. Additionally, as directed in a workaround described in #15510, create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShellCore\InstalledVersions\31ab5147-9a97-4452-8443-d9709f0516e1.

Ensure Windows Update is set to Receive updates for other Microsoft products when you update Windows. In my case, this is enforced by my organization through MDM.

Reboot and check Windows Update, installing all available updates and manually rechecking until no updates appear.

Expected behavior

PS> pwsh-preview
PowerShell 7.2-preview.7
PS>

Actual behavior

<See screenshot below>

Environment data

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS> (Get-CimInstance Win32_OperatingSystem) | Select-Object -Property Version, Caption

Version    Caption
-------    -------
10.0.19042 Microsoft Windows 10 Enterprise

PS> Get-WindowsUpdateLog

<Very long console output snipped, see below-attached file WindowsUpdate.log created by command>

Visuals

msups
WindowsUpdate.log

@ghost ghost added the Needs-Triage The issue is new and needs to be triaged by a work group. label Jun 29, 2021
@TravisEz13
Copy link
Member

From windowsupdate.log, F13D5FD1-FA6A-4F9E-88D4-8B15EA0DBA4C is the PowerShell update and it deferred by policy on your machine. Can you send a screen shot of your advanced windows update settings?

021-06-29 12:50:25.3909115 4508  8416  Agent           Update deferred by policy: F13D5FD1-FA6A-4F9E-88D4-8B15EA0DBA4C.200

@TravisEz13 TravisEz13 added the Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a label Jun 29, 2021
@TravisEz13
Copy link
Member

You probably can install this using the PSWindowsUpdate module (using the API). I'm assuming whatever policy it is, it only affects Automatic Updates and not the API.

Once you have installed the module,

Get-WindowsUpdate -CategoryIDs c90a4362-d2b6-4bb4-b316-76d14fed63a5 | Install-WindowsUpdate -Download

This says, get all the updates for PowerShell preview, download, and install them.

@ghost
Copy link
Author

ghost commented Jun 30, 2021

Ah, yes. We have organizational policy through Endpoint Manager to defer non-security updates. That explains this. I'll leave it as-is, thanks for finding the explanation!

@ghost ghost closed this as completed Jun 30, 2021
@ghost ghost removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Jun 30, 2021
@237dmitry
Copy link

How could you update Powershell via Windows Update? From the first (6+ may be) to 7.1.3 i it was updated by hands (msi).

@ghost
Copy link
Author

ghost commented Jun 30, 2021

@237dmitry See this blog article.

@237dmitry
Copy link

See this blog article.

You never know who will write something.

@TravisEz13
Copy link
Member

@alexbuzzbee RE: #15692 (comment), Thanks for explaining what policy was in place, the logs don't say that. It makes the answer more complete.

@TravisEz13 TravisEz13 added the Resolution-Answered The question is answered. label Jun 30, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.
Projects
None yet
Development

No branches or pull requests

2 participants