From 7a72c7390629b042757307da452c26f648f187f4 Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:25:08 +0300 Subject: [PATCH] Talk about "PowerShell 7 from the Microsoft Store" inside of KnownIssues.md (#4758) * Talk about "PowerShell 7 from the Microsoft Store" inside of KnownIssues.md * Update Invoke-WinUtilInstallPSProfile.ps1 * Update KnownIssues.md * Update KnownIssues.md * Update KnownIssues.md --- docs/content/KnownIssues.md | 15 +++++++++++++++ .../private/Invoke-WinUtilInstallPSProfile.ps1 | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/content/KnownIssues.md b/docs/content/KnownIssues.md index db1e8987..1cbc2c4d 100644 --- a/docs/content/KnownIssues.md +++ b/docs/content/KnownIssues.md @@ -30,3 +30,18 @@ In these cases, the power plan may fail to apply, This is expected behavior on u Revert start menu tweak stops working starting with **Windows 11 update KB5089573** (released in May 2026). In this update, Microsoft completely removed the old Start Menu code from Windows, so we aren't able to bring it back. + +### Issues with PowerShell 7 or Class not registered Error +Installing PowerShell 7 from the Microsoft Store (MSIX package) is known to cause issues with DISM cmdlets such as `Get-WindowsOptionalFeature` and `Enable-WindowsOptionalFeature`, resulting in a `Class not registered` COM error. + +This might also make it so running the "pre-installed app removal" will take a indefinite amount of time + +Instead, install PowerShell 7 using one of the following methods: + +**winget (recommended):** +```powershell +winget install --id Microsoft.PowerShell --source winget --installer-type wix +``` +**Direct MSI from GitHub Releases:** Download the `.msi` installer from the [PowerShell GitHub Releases](https://github.com/PowerShell/PowerShell/releases) page. + +For more details see https://github.com/PowerShell/PowerShell/issues/13866 diff --git a/functions/private/Invoke-WinUtilInstallPSProfile.ps1 b/functions/private/Invoke-WinUtilInstallPSProfile.ps1 index 95359185..c103f03c 100644 --- a/functions/private/Invoke-WinUtilInstallPSProfile.ps1 +++ b/functions/private/Invoke-WinUtilInstallPSProfile.ps1 @@ -8,7 +8,7 @@ function Invoke-WinUtilInstallPSProfile { if (-not (Get-Command pwsh)) { Write-Host "PowerShell 7 not found. Installing..." Install-WinUtilWinget - winget install Microsoft.PowerShell --source winget --silent + winget install Microsoft.PowerShell --source winget --installer-type wix --silent } wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"