Skip to content

Unable to acquire available capabilities and optional features due to class registration failure. #25835

@RokeJulianLockhart

Description

@RokeJulianLockhart

Prerequisites

Steps to reproduce

Invoke Get-WindowsCapability -Online or Get-WindowsOptionalFeature -Online.

Expected behavior

They should return relevant data.

Actual behavior

They hang for ⪆ PT1M20S, after which they return "Class not registered", and assign $False to $?. See the undermentioned.

Error details

    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -Version 7.6.0
      #Requires -RunAsAdministrator
      If ($IsWindows) {
      	Get-WindowsCapability -Online
      	If ($? -Eq $False) { Get-Error -Newest 1 | Export-CLIXML "$HOME/Get-WindowsCapability.XML" }
      }
    2. <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
        <Obj RefId="0">
          <TN RefId="0">
            <T>System.Management.Automation.ErrorRecord#PSExtendedError</T>
            <T>System.Object</T>
          </TN>
          <ToString>Class not registered_x000D__x000A_</ToString>
          <MS>
            <Obj N="Exception" RefId="1">
              <TN RefId="1">
                <T>System.Runtime.InteropServices.COMException</T>
                <T>System.Runtime.InteropServices.ExternalException</T>
                <T>System.SystemException</T>
                <T>System.Exception</T>
                <T>System.Object</T>
              </TN>
              <ToString>System.Runtime.InteropServices.COMException (0x80040154): Class not registered_x000D__x000A__x000D__x000A_   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)</ToString>
              <Props>
                <I32 N="ErrorCode">-2147221164</I32>
                <S N="TargetSite">Void ThrowTerminatingError(System.Management.Automation.ErrorRecord)</S>
                <S N="Message">Class not registered_x000D__x000A_</S>
                <Obj N="Data" RefId="2">
                  <TN RefId="2">
                    <T>System.Collections.ListDictionaryInternal</T>
                    <T>System.Object</T>
                  </TN>
                  <DCT />
                </Obj>
                <Nil N="InnerException" />
                <Nil N="HelpLink" />
                <S N="Source">System.Management.Automation</S>
                <I32 N="HResult">-2147221164</I32>
                <S N="StackTrace">   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)</S>
              </Props>
              <MS>
                <S N="Type">System.Runtime.InteropServices.COMException</S>
              </MS>
            </Obj>
            <Nil N="TargetObject" />
            <S N="FullyQualifiedErrorId">Microsoft.Dism.Commands.GetWindowsCapabilityCommand</S>
            <Obj N="InvocationInfo" RefId="3">
              <TN RefId="3">
                <T>System.Management.Automation.InvocationInfo</T>
                <T>System.Object</T>
              </TN>
              <ToString>System.Management.Automation.InvocationInfo</ToString>
              <Props>
                <Obj N="MyCommand" RefId="4">
                  <TN RefId="4">
                    <T>System.Management.Automation.CmdletInfo</T>
                    <T>System.Management.Automation.CommandInfo</T>
                    <T>System.Object</T>
                  </TN>
                  <ToString>Get-WindowsCapability</ToString>
                  <Props>
                    <S N="Verb">Get</S>
                    <S N="Noun">WindowsCapability</S>
                    <S N="HelpFile">Microsoft.Dism.PowerShell.dll-Help.xml</S>
                    <Nil N="PSSnapIn" />
                    <Version N="Version">3.0</Version>
                    <S N="ImplementingType">Microsoft.Dism.Commands.GetWindowsCapabilityCommand</S>
                    <S N="Definition">_x000D__x000A_Get-WindowsCapability -Path &lt;string&gt; [-Name &lt;string&gt;] [-LimitAccess] [-Source &lt;string[]&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]_x000D__x000A__x000D__x000A_Get-WindowsCapability -Online [-Name &lt;string&gt;] [-LimitAccess] [-Source &lt;string[]&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]_x000D__x000A_</S>
                    <Nil N="DefaultParameterSet" />
                    <Obj N="OutputType" RefId="5">
                      <TN RefId="5">
                        <T>System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.PSTypeName, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <LST>
                        <S>System.Collections.Generic.List`1[[Microsoft.Dism.Commands.BasicCapabilityObject, Microsoft.Dism.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]]</S>
                        <S>System.Collections.Generic.List`1[[Microsoft.Dism.Commands.AdvancedCapabilityObject, Microsoft.Dism.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]]</S>
                      </LST>
                    </Obj>
                    <S N="Options">ReadOnly</S>
                    <S N="Name">Get-WindowsCapability</S>
                    <S N="CommandType">Cmdlet</S>
                    <S N="Source">Dism</S>
                    <S N="Visibility">Public</S>
                    <S N="ModuleName">Dism</S>
                    <S N="Module">Dism</S>
                    <S N="RemotingCapability">PowerShell</S>
                    <Obj N="Parameters" RefId="6">
                      <TN RefId="6">
                        <T>System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Management.Automation.ParameterMetadata, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <DCT>
                        <En>
                          <S N="Key">Name</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">LimitAccess</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Source</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Path</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Online</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WindowsDirectory</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">SystemDrive</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">LogPath</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ScratchDirectory</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">LogLevel</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Verbose</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Debug</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ErrorAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WarningAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">InformationAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ProgressAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ErrorVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WarningVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">InformationVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">OutVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">OutBuffer</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">PipelineVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                      </DCT>
                    </Obj>
                    <Obj N="ParameterSets" RefId="7">
                      <TN RefId="7">
                        <T>System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.CommandParameterSetInfo, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <LST>
                        <S>-Path &lt;string&gt; [-Name &lt;string&gt;] [-LimitAccess] [-Source &lt;string[]&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]</S>
                        <S>-Online [-Name &lt;string&gt;] [-LimitAccess] [-Source &lt;string[]&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]</S>
                      </LST>
                    </Obj>
                  </Props>
                  <MS>
                    <S N="Namespace">Dism</S>
                    <S N="HelpUri"></S>
                    <S N="DLL">C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Dism\Microsoft.Dism.PowerShell.dll</S>
                  </MS>
                </Obj>
                <Obj N="BoundParameters" RefId="8">
                  <TN RefId="8">
                    <T>System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
                    <T>System.Object</T>
                  </TN>
                  <DCT />
                </Obj>
                <Obj N="UnboundArguments" RefId="9">
                  <TN RefId="9">
                    <T>System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
                    <T>System.Object</T>
                  </TN>
                  <LST />
                </Obj>
                <I32 N="ScriptLineNumber">1</I32>
                <I32 N="OffsetInLine">1</I32>
                <I64 N="HistoryId">1</I64>
                <S N="ScriptName"></S>
                <S N="Line">Get-WindowsCapability -Online</S>
                <S N="Statement">Get-WindowsCapability -Online</S>
                <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ Get-WindowsCapability -Online_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
                <S N="PSScriptRoot"></S>
                <Nil N="PSCommandPath" />
                <S N="InvocationName">Get-WindowsCapability</S>
                <I32 N="PipelineLength">0</I32>
                <I32 N="PipelinePosition">0</I32>
                <B N="ExpectingInput">false</B>
                <Obj N="CommandOrigin" RefId="10">
                  <TN RefId="10">
                    <T>System.Management.Automation.CommandOrigin</T>
                    <T>System.Enum</T>
                    <T>System.ValueType</T>
                    <T>System.Object</T>
                  </TN>
                  <ToString>Internal</ToString>
                  <I32>1</I32>
                </Obj>
                <Nil N="DisplayScriptPosition" />
              </Props>
            </Obj>
            <I32 N="ErrorCategory_Category">0</I32>
            <S N="ErrorCategory_Activity">Get-WindowsCapability</S>
            <S N="ErrorCategory_Reason">COMException</S>
            <S N="ErrorCategory_TargetName"></S>
            <S N="ErrorCategory_TargetType"></S>
            <S N="ErrorCategory_Message">NotSpecified: (:) [Get-WindowsCapability], COMException</S>
            <B N="SerializeExtendedInfo">false</B>
            <S N="ErrorDetails_ScriptStackTrace">at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1</S>
          </MS>
        </Obj>
      </Objs>

    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -Version 7.6.0
      #Requires -RunAsAdministrator
      If ($IsWindows) {
      	Get-WindowsOptionalFeature -Online
      	If ($? -Eq $False) { Get-Error -Newest 1 | Export-CLIXML "$HOME/Get-WindowsOptionalFeature.XML" }
      }
    2. <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
        <Obj RefId="0">
          <TN RefId="0">
            <T>System.Management.Automation.ErrorRecord#PSExtendedError</T>
            <T>System.Object</T>
          </TN>
          <ToString>Class not registered_x000D__x000A_</ToString>
          <MS>
            <Obj N="Exception" RefId="1">
              <TN RefId="1">
                <T>System.Runtime.InteropServices.COMException</T>
                <T>System.Runtime.InteropServices.ExternalException</T>
                <T>System.SystemException</T>
                <T>System.Exception</T>
                <T>System.Object</T>
              </TN>
              <ToString>System.Runtime.InteropServices.COMException (0x80040154): Class not registered_x000D__x000A__x000D__x000A_   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)</ToString>
              <Props>
                <I32 N="ErrorCode">-2147221164</I32>
                <S N="TargetSite">Void ThrowTerminatingError(System.Management.Automation.ErrorRecord)</S>
                <S N="Message">Class not registered_x000D__x000A_</S>
                <Obj N="Data" RefId="2">
                  <TN RefId="2">
                    <T>System.Collections.ListDictionaryInternal</T>
                    <T>System.Object</T>
                  </TN>
                  <DCT />
                </Obj>
                <Nil N="InnerException" />
                <Nil N="HelpLink" />
                <S N="Source">System.Management.Automation</S>
                <I32 N="HResult">-2147221164</I32>
                <S N="StackTrace">   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)</S>
              </Props>
              <MS>
                <S N="Type">System.Runtime.InteropServices.COMException</S>
              </MS>
            </Obj>
            <Nil N="TargetObject" />
            <S N="FullyQualifiedErrorId">Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand</S>
            <Obj N="InvocationInfo" RefId="3">
              <TN RefId="3">
                <T>System.Management.Automation.InvocationInfo</T>
                <T>System.Object</T>
              </TN>
              <ToString>System.Management.Automation.InvocationInfo</ToString>
              <Props>
                <Obj N="MyCommand" RefId="4">
                  <TN RefId="4">
                    <T>System.Management.Automation.CmdletInfo</T>
                    <T>System.Management.Automation.CommandInfo</T>
                    <T>System.Object</T>
                  </TN>
                  <ToString>Get-WindowsOptionalFeature</ToString>
                  <Props>
                    <S N="Verb">Get</S>
                    <S N="Noun">WindowsOptionalFeature</S>
                    <S N="HelpFile">Microsoft.Dism.PowerShell.dll-Help.xml</S>
                    <Nil N="PSSnapIn" />
                    <Version N="Version">3.0</Version>
                    <S N="ImplementingType">Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand</S>
                    <S N="Definition">_x000D__x000A_Get-WindowsOptionalFeature -Path &lt;string&gt; [-FeatureName &lt;string&gt;] [-PackageName &lt;string&gt;] [-PackagePath &lt;string&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]_x000D__x000A__x000D__x000A_Get-WindowsOptionalFeature -Online [-FeatureName &lt;string&gt;] [-PackageName &lt;string&gt;] [-PackagePath &lt;string&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]_x000D__x000A_</S>
                    <Nil N="DefaultParameterSet" />
                    <Obj N="OutputType" RefId="5">
                      <TN RefId="5">
                        <T>System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.PSTypeName, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <LST>
                        <S>System.Collections.Generic.List`1[[Microsoft.Dism.Commands.BasicFeatureObject, Microsoft.Dism.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]]</S>
                        <S>Microsoft.Dism.Commands.AdvancedFeatureObject</S>
                      </LST>
                    </Obj>
                    <S N="Options">ReadOnly</S>
                    <S N="Name">Get-WindowsOptionalFeature</S>
                    <S N="CommandType">Cmdlet</S>
                    <S N="Source">Dism</S>
                    <S N="Visibility">Public</S>
                    <S N="ModuleName">Dism</S>
                    <S N="Module">Dism</S>
                    <S N="RemotingCapability">PowerShell</S>
                    <Obj N="Parameters" RefId="6">
                      <TN RefId="6">
                        <T>System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Management.Automation.ParameterMetadata, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <DCT>
                        <En>
                          <S N="Key">FeatureName</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">PackageName</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">PackagePath</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Path</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Online</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WindowsDirectory</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">SystemDrive</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">LogPath</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ScratchDirectory</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">LogLevel</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Verbose</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">Debug</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ErrorAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WarningAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">InformationAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ProgressAction</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">ErrorVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">WarningVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">InformationVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">OutVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">OutBuffer</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                        <En>
                          <S N="Key">PipelineVariable</S>
                          <S N="Value">System.Management.Automation.ParameterMetadata</S>
                        </En>
                      </DCT>
                    </Obj>
                    <Obj N="ParameterSets" RefId="7">
                      <TN RefId="7">
                        <T>System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.CommandParameterSetInfo, System.Management.Automation, Version=7.6.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
                        <T>System.Object</T>
                      </TN>
                      <LST>
                        <S>-Path &lt;string&gt; [-FeatureName &lt;string&gt;] [-PackageName &lt;string&gt;] [-PackagePath &lt;string&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]</S>
                        <S>-Online [-FeatureName &lt;string&gt;] [-PackageName &lt;string&gt;] [-PackagePath &lt;string&gt;] [-WindowsDirectory &lt;string&gt;] [-SystemDrive &lt;string&gt;] [-LogPath &lt;string&gt;] [-ScratchDirectory &lt;string&gt;] [-LogLevel &lt;LogLevel&gt;] [&lt;CommonParameters&gt;]</S>
                      </LST>
                    </Obj>
                  </Props>
                  <MS>
                    <S N="Namespace">Dism</S>
                    <S N="HelpUri">https://go.microsoft.com/fwlink/?LinkId=289358</S>
                    <S N="DLL">C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Dism\Microsoft.Dism.PowerShell.dll</S>
                  </MS>
                </Obj>
                <Obj N="BoundParameters" RefId="8">
                  <TN RefId="8">
                    <T>System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
                    <T>System.Object</T>
                  </TN>
                  <DCT />
                </Obj>
                <Obj N="UnboundArguments" RefId="9">
                  <TN RefId="9">
                    <T>System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
                    <T>System.Object</T>
                  </TN>
                  <LST />
                </Obj>
                <I32 N="ScriptLineNumber">1</I32>
                <I32 N="OffsetInLine">1</I32>
                <I64 N="HistoryId">1</I64>
                <S N="ScriptName"></S>
                <S N="Line">Get-WindowsOptionalFeature -Online</S>
                <S N="Statement">Get-WindowsOptionalFeature -Online</S>
                <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ Get-WindowsOptionalFeature -Online_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
                <S N="PSScriptRoot"></S>
                <Nil N="PSCommandPath" />
                <S N="InvocationName">Get-WindowsOptionalFeature</S>
                <I32 N="PipelineLength">0</I32>
                <I32 N="PipelinePosition">0</I32>
                <B N="ExpectingInput">false</B>
                <Obj N="CommandOrigin" RefId="10">
                  <TN RefId="10">
                    <T>System.Management.Automation.CommandOrigin</T>
                    <T>System.Enum</T>
                    <T>System.ValueType</T>
                    <T>System.Object</T>
                  </TN>
                  <ToString>Internal</ToString>
                  <I32>1</I32>
                </Obj>
                <Nil N="DisplayScriptPosition" />
              </Props>
            </Obj>
            <I32 N="ErrorCategory_Category">0</I32>
            <S N="ErrorCategory_Activity">Get-WindowsOptionalFeature</S>
            <S N="ErrorCategory_Reason">COMException</S>
            <S N="ErrorCategory_TargetName"></S>
            <S N="ErrorCategory_TargetType"></S>
            <S N="ErrorCategory_Message">NotSpecified: (:) [Get-WindowsOptionalFeature], COMException</S>
            <B N="SerializeExtendedInfo">false</B>
            <S N="ErrorDetails_ScriptStackTrace">at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1</S>
          </MS>
        </Obj>
      </Objs>

Environment data

  1. #!/usr/bin/env pwsh
    #Requires -PSEdition Core
    #Requires -Version 7.6.0
    If ($IsWindows) { $PSVersionTable }
  2. <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
      <Obj RefId="0">
        <TN RefId="0">
          <T>System.Management.Automation.PSVersionHashTable</T>
          <T>System.Collections.Hashtable</T>
          <T>System.Object</T>
        </TN>
        <DCT>
          <En>
            <S N="Key">PSEdition</S>
            <S N="Value">Core</S>
          </En>
          <En>
            <S N="Key">PSCompatibleVersions</S>
            <Obj N="Value" RefId="1">
              <TN RefId="1">
                <T>System.Version[]</T>
                <T>System.Array</T>
                <T>System.Object</T>
              </TN>
              <LST>
                <Version>1.0</Version>
                <Version>2.0</Version>
                <Version>3.0</Version>
                <Version>4.0</Version>
                <Version>5.0</Version>
                <Version>5.1</Version>
                <Version>6.0</Version>
                <Version>7.0</Version>
              </LST>
            </Obj>
          </En>
          <En>
            <S N="Key">PSRemotingProtocolVersion</S>
            <Version N="Value">2.3</Version>
          </En>
          <En>
            <S N="Key">GitCommitId</S>
            <S N="Value">7.6.0-preview.4</S>
          </En>
          <En>
            <S N="Key">WSManStackVersion</S>
            <Version N="Value">3.0</Version>
          </En>
          <En>
            <S N="Key">PSVersion</S>
            <Obj N="Value" RefId="2">
              <TN RefId="2">
                <T>System.Management.Automation.SemanticVersion</T>
                <T>System.Object</T>
              </TN>
              <ToString>7.6.0-preview.4</ToString>
              <Props>
                <I32 N="Major">7</I32>
                <I32 N="Minor">6</I32>
                <I32 N="Patch">0</I32>
                <S N="PreReleaseLabel">preview.4</S>
                <Nil N="BuildLabel" />
              </Props>
            </Obj>
          </En>
          <En>
            <S N="Key">OS</S>
            <S N="Value">Microsoft Windows 10.0.26120</S>
          </En>
          <En>
            <S N="Key">Platform</S>
            <S N="Value">Win32NT</S>
          </En>
          <En>
            <S N="Key">SerializationVersion</S>
            <Version N="Value">1.1.0.1</Version>
          </En>
        </DCT>
      </Obj>
    </Objs>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions