Repository navigation
Closed as duplicate
Labels
Issue-BugIssue has been identified as a bug in the productOS-WindowsPackage-MSIXIssue occurs with MSIX packageResolution-ExternalThe issue is caused by external component(s).
Description
Steps to reproduce
Type
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Expected behavior
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\Administrator> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Name : OpenSSH.Client~~~~0.0.1.0
State : Installed
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
Actual behavior
PowerShell 7.2.0-preview.5
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
PS C:\openssh> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Get-WindowsCapability: Class not registered
Environment data
Powershell 5.1 (working)
PS C:\Users\Administrator> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.21376.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.21376.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Powershell 7 (installed from Store)
PS C:\openssh> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.0-preview.5
PSEdition Core
GitCommitId 7.2.0-preview.5
OS Microsoft Windows 10.0.21376
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional Notes
Referenced in PowerShell/WindowsCompatibility#87
I wasn't sure if it was the right place to report this issue, so I'm reporting here.
Reacted by Dave Tapley, Franco Gastón Pellegrini, John D. Gwinner, Colin McLean, IllLil and Ilya
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productOS-WindowsPackage-MSIXIssue occurs with MSIX packageResolution-ExternalThe issue is caused by external component(s).
Activity
TravisEz13 commentedon May 27, 2021
I am not able to reproduce this issue

It looks like you are running an insider build of Windows. The problem may be there.
blacklightpy commentedon May 28, 2021
Yes, I was on build 21376, and I'm not on 21390 and it is still there.
Also, apparently it seems to recognize the command when I'm running without elevation.
But this is different to the output on Powershell 5.1
It's like Powershell 7 recognizes the cmdlet itself that it requires elevation, but doesn't know it's function.
I thought that was worth adding.
dr-kristau commentedon Oct 20, 2021
I can reproduce exactly the same issue using the following version:
When I run without Administrator privileges I obtain this:
And with Administrator privileges I obtain this:
Worth mentioning that if I use Windows PowerShell:
I can run the command successfully, although only with Administrator privileges:
davetapley commentedon Nov 23, 2021
Travis Plunk (@TravisEz13) I was able to repro this in a Windows 10 Pro VM on Azure (after installing Powershell 7):
(I was following this guide).
iSazonov commentedon Nov 24, 2021
This works well for me. Can you check on fresh Windows 10?
blacklightpy commentedon Nov 24, 2021
I can't right now because I have a lot of apps required for work
francogp commentedon Feb 8, 2022
If I run the command on OLD powershell, it works

But If I use the new powershell, it fails

jgwinner commentedon Feb 23, 2022
I can duplicate this issue on Windows 11 and just updated last night. It's quite irritating as I can't get VS Code SSH setup for a critical work issue. I was able to get SSH loaded by going through the control panel though.
It takes QUITE a long time as well. More details:
14 remaining items
WebTiger89 commentedon Dec 8, 2022
"Fucking shit Microsoft" others might be saying, but not me. I like Microsoft and its support.
RobotToaster commentedon Dec 12, 2022
So the official advice from microsoft, is to not trust the microsoft store to install things correctly?
doctordns commentedon Dec 12, 2022
I suspect the best advice is that you have many ways to install PowerShell 7. Some come with limitations based on the underlying delivery mechanisms. You need to choose what is best for your organisation.
Personally, I use the
iInstall-PowerShell.ps1script in this repo which gives me all the control I need over installation.Winget and Chocolatey are also methods you can use. Chocolatey even has cmdlets to simplify your journey. For simple use cases, you can also use a more locked-down version of PowerShell delivered via the Store. And if you are really hard-core, you can come here and get the release components directly from the source.
rizolo commentedon Dec 12, 2022
I can confirm that using
winget install Microsoft.PowerShell, after uninstalling the MS Store copy, that this does in fact let me useGet-WindowsOptionalFeature -OnlineWebTiger89 commentedon Dec 12, 2022
Riz Virani (@rizolo) That's because winget installs the .msi Version of Powershell. But this issue is about the appx (UWP) version of powershell which can be obtained via Microsoft Store. While the powershell appx version 5.1 works, Powershell 7.2.6 and 7.3.0-preview.8 don't. I didn't test the final powershell 7.3.0 version.
WebTiger89 commentedon Dec 12, 2022
Thomas Lee (@doctordns)
There is enough evidence here that the UWP version does not work as expected (at least the newer versions).
It is fine if this topic is too complicated for you and you don't understand what is going on, but understand that this is a real issue that should be tackled so reopen this issue or remove powershell from store and or do not provide an UWP version.
FuccDucc commentedon Dec 13, 2022
It's bureaucracy and that the teams within many large companies don't really work together/communicate properly or at all..
Even after more than a year, Microsoft didn't accomplish to let the OS/Appx/whatever other team, make a Microsoft product (that advertises itself as an improvement over the standard version) integrate properly. It's a failure of the chain or maybe the MS devs in github here are low level ones that don't have enough connections within the "real" company and can't break some barriers of team interoperability and cooperation. Of course, in the end, the result being produced is a symptom of lack of quality as a company, but the maintainers of this repo don't care enough and it's convenient to shove any such things with the thought "Not our problem / we dont get paid for this / there is invisible walls within Microsoft we cant break up, neither are we interested in looking at a solution for that"
I'm probably mixing observations with the other very similar issue #13138 where exactly the same root causes lead the maintainers to say "We dont care, not our problem, ok, closed"
daxian-dbw commentedon Feb 7, 2023
Just FYI, the "Class not registered" error happens in PowerShell installed from MS Store is likely due to the registry virtualization applied to Store apps, see #13866 (comment). The issue is tracked by #13866, and this is the latest updates on that issue: #13866 (comment)
Warrentheo commentedon Mar 25, 2023
I can confirm that deleting the msstore version corrected this issue for me.
JunielKatarn commentedon Oct 24, 2024
Running this command from Windows Powershell (Admin) (not PWSH) worked, but it failed on the first attempt:
thegitworker commentedon Jun 25, 2026
Confirm 5 years later still an issue. I cannot run the
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'command in PowerShell 7.6.3. downloaded from the Microsoft Store. After uninstalling and installing PowerShell 7.6.3 from the MSI it works.No idea why this is closed when the issue still exists.
Get-WindowsOptionalFeature -Onlinefails on PowerShell from MSIX installation - [Get-WindowsOptionalFeature: Class not registered] #13866kilasuit commentedon Jun 26, 2026
Closing as duplicate of #13866 as whilst the cmdlets mentioned are different the underlying issue is the same
Psychlist1972 commentedon Oct 29, 2026
I ran into this yesterday on a Windows 11 26h2 box, with PowerShell 7.x installed via MSI, not via MSIX. #13866 seems different as it's about MSIX-installed version.
I was trying to install the OpenSSH Server capability for Github Copilot remote agents. The call took quite some time to run, and then failed with "Class not registered" as I recall. This was in an admin terminal.
I then shelled to Windows PowerShell in the same terminal, and although it took a crazy amount of time to install (like 30 minutes), it completed.
So I just repeated the test to have better info. Under PowerShell 7.6.9, the
Get-WindowsCapabilitycall takes over two minutes to return the error under 7.x and returns almost instantly under 5.xEdit: Actually, somehow, I'm seeing the MSIX version instead of the version I thought I had installed.
But if MSIX truly is the problem, 7.7.0 ONLY offers MSIX from this point forward, which will continue to break these commands.
Pete
Microsoft