Skip to content

Various commands do not work when PowerShell is installed via msixbundle / "class not registered" #18241

Closed
@KChZellemann

Description

@KChZellemann

Prerequisites

Steps to reproduce

When I install PowerShell via the msixbundle, various commands (like Get-AppxProvisionedPackage, Get-WindowsOptionalFeature) do not work. After entering one of the commands it takes some time and then I only get the message "class not registered".

I tried the following commands to install the msixbundle:

Add-ProvisionedAppxPackage -Online -PackagePath "C:\PowerShell-7.2.6-win.msixbundle" -SkipLicense;

or

Add-AppxPackage -Path "C:\PowerShell-7.2.6-win.msixbundle";

Expected behavior

PS C:\Windows\System32> Get-AppxProvisionedPackage -Online

DisplayName  : Clipchamp.Clipchamp
Version      : 2.2.8.0
Architecture : neutral
ResourceId   : ~
PackageName  : Clipchamp.Clipchamp_2.2.8.0_neutral_~_yxz26nhyzhsrt
Regions      : all

DisplayName  : Microsoft.549981C3F5F10
Version      : 3.2204.14815.0
Architecture : neutral
ResourceId   : ~
PackageName  : Microsoft.549981C3F5F10_3.2204.14815.0_neutral_~_8wekyb3d8bbwe
Regions      : all

DisplayName  : Microsoft.BingNews
Version      : 4.2.27001.0
Architecture : neutral
ResourceId   : ~
PackageName  : Microsoft.BingNews_4.2.27001.0_neutral_~_8wekyb3d8bbwe
Regions      : all

Actual behavior

PS C:\Windows\System32> Get-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage: Klasse nicht registriert

Error details

PS C:\Windows\System32> Get-Error

Exception             :
    Type       : System.Runtime.InteropServices.COMException
    ErrorCode  : -2147221164
    TargetSite :
        Name          : ThrowTerminatingError
        DeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation,
Version=7.2.6.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
        MemberType    : Method
        Module        : System.Management.Automation.dll
    Message    : Klasse nicht registriert

    Source     : System.Management.Automation
    HResult    : -2147221164
    StackTrace :
   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
CategoryInfo          : NotSpecified: (:) [Get-AppxProvisionedPackage], COMException
FullyQualifiedErrorId : Microsoft.Dism.Commands.GetAppxProvisionedPackageCommand
InvocationInfo        :
    MyCommand        : Get-AppxProvisionedPackage
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 1
    Line             : Get-AppxProvisionedPackage -Online
    PositionMessage  : At line:1 char:1
                       + Get-AppxProvisionedPackage -Online
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Get-AppxProvisionedPackage
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1

Environment data

PS C:\Windows\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 10.0.22621 // Windows 11 22H2
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Screnshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Package-MSIXIssue occurs with MSIX packageResolution-DuplicateThe issue is a duplicate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions