Get-WinGetPackage in 1.29.380 fails with "Failed to create instance: -2147023174" in an elevated PowerShell session
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
The issue is in the PowerShell module Microsoft.WinGet.Client, specifically the Get-WinGetPackage command. Start by examining the COM interop code in the module that creates the instance, likely in the GetPackageCmdlet class. Compare the changes between versions 1.29.280 and 1.29.380 to identify what broke elevated session support. Test the fix in an elevated PowerShell session on Windows Server 2025 to confirm the error is resolved.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Relevant area(s)
PowerShell Module
Relevant command(s)
Get-WinGetPackage. I did not test other commands, so those might be affected as well.
Brief description of your issue
Get-WinGetPackage in 1.29.380 fails with "Failed to create instance: -2147023174" in an elevated PowerShell session.
Steps to reproduce
In an elevated PowerShell session (tested with Windows Server 2025, the built-in Administrator account and the built-in PowerShell version):
Uninstall-Module Microsoft.WinGet.Client
Install-Module -Name Microsoft.WinGet.Client -RequiredVersion 1.29.280
Get-WinGetPackage
Note that Get-WinGetPackage outputs the list of installed packages. Now let's try the same with 1.29.380:
Uninstall-Module Microsoft.WinGet.Client
Install-Module -Name Microsoft.WinGet.Client -RequiredVersion 1.29.380
Get-WinGetPackage
Expected behavior
Get-WinGetPackage behaves like in 1.29.280.
Actual behavior
Get-WinGetPackage : Failed to create instance: -2147023174
At line:1 char:1
+ Get-WinGetPackage
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WinGetPackage], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.WinGet.Client.Commands.GetPackageC
mdlet
Get-WinGetPackage works in a non-elevated PowerShell session.
Reverting to 1.29.280 (see above) fixes the issue.
Environment
Windows Package Manager v1.11.510
Windows: Windows.Server v10.0.26100.32522
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.510.0
- Lenguaje dominante
- C++
- Estrellas
- 26.6k
- Forks
- 1.8k
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 41
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/winget-cli
-
Issue-Docs Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
microsoft/winget-cli#6692 ·
Los mantenedores suelen responder en 2 días
-
Issue-Docs Possible-Duplicate
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microsoft/winget-cli#6493 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itAbiertoIssue-Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/winget-cli#6427 ·
Los mantenedores suelen responder en 2 días
-
Issue-Docs msstore
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
microsoft/winget-cli#6331 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Command-Source Issue-Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/winget-cli#6148 ·
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/winget-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stratum-mining/sv2-tp#167 ·
Los mantenedores suelen responder en 1 día
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversAbiertoauth bug ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MerginMaps/mobile#4795 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
HarperFast/rocksdb-js#1118 ·
Los mantenedores suelen responder en 1 día
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CollaboraOnline/online#16421 · 1 comentario ·