You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running winget in a non-interactive session, like ssh/winrm, any operations that need to setup the winget source will fail. By default 2 sources seem to be available out of the box msstore and winget where msstore won't work until at least one interactive logon has happened for that user and winget which fails to register the Microsoft.Winget.Source_8wekyb3d8bbwe package.
On investigation I can see in the winget logs the following
2026-06-26 00:17:46.749 [CORE] WinGet, version [1.9.25200], activity [{A59ABDA5-31FD-4204-9549-A6D4D6A2DF85}]
2026-06-26 00:17:46.750 [CORE] OS: Windows.Server v10.0.26100.32995
2026-06-26 00:17:46.750 [CORE] Command line Args: "C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\winget.exe" list --disable-interactivity --accept-source-agreements --verbose
2026-06-26 00:17:46.750 [CORE] Package: Microsoft.DesktopAppInstaller v1.24.25200.0
2026-06-26 00:17:46.750 [CORE] IsCOMCall:0; Caller: winget-cli
2026-06-26 00:17:46.755 [CLI ] WinGet invoked with arguments: 'list' '--disable-interactivity' '--accept-source-agreements' '--verbose'
2026-06-26 00:17:46.756 [CLI ] Found subcommand: list
2026-06-26 00:17:46.756 [CLI ] Leaf command to execute: root:list
2026-06-26 00:17:46.757 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2026-06-26 00:17:46.758 [CORE] Admin settings was not found
2026-06-26 00:17:46.758 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2026-06-26 00:17:46.758 [CORE] Admin settings was not found
2026-06-26 00:17:46.758 [CLI ] Executing command: list
2026-06-26 00:17:46.758 [REPO] Additional sources GP is not enabled.
2026-06-26 00:17:46.758 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2026-06-26 00:17:46.758 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2026-06-26 00:17:46.758 [CORE] Admin settings was not found
2026-06-26 00:17:46.758 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
sfdataservice.microsoft.com : Subject | Issuer
2026-06-26 00:17:46.758 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
sfdataservice.microsoft.com : Subject | Issuer
2026-06-26 00:17:46.765 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2026-06-26 00:17:46.766 [YAML] Detected UTF-8
2026-06-26 00:17:46.766 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2026-06-26 00:17:46.766 [REPO] Default source requested, multiple sources available, adding all to source references.
2026-06-26 00:17:46.766 [REPO] Adding to source references msstore
2026-06-26 00:17:46.766 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2026-06-26 00:17:46.766 [CORE] Admin settings was not found
2026-06-26 00:17:46.766 [CORE] Default proxy is not set
2026-06-26 00:17:46.766 [REPO] REST HTTP Client helper does not use proxy
2026-06-26 00:17:46.766 [REPO] Adding to source references winget
2026-06-26 00:17:46.766 [CLI ] Created authentication arguments. Mode: silent, Account:
2026-06-26 00:17:46.770 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-06-26 00:17:46.770 [REPO] Source `winget` has no data
2026-06-26 00:17:46.771 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-06-26 00:17:46.771 [CORE] Retrieving headers from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-06-26 00:17:46.820 [REPO] Header indicates version is: 2026.625.2439.0
2026-06-26 00:17:46.821 [CORE] Downloading to path: C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-06-26 00:17:46.822 [CORE] Started applying motw to C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2026-06-26 00:17:46.823 [CORE] Finished applying motw
2026-06-26 00:17:46.823 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-06-26 00:17:46.840 [CORE] Download request status success.
2026-06-26 00:17:46.840 [CORE] Download size: 3227357
2026-06-26 00:17:46.840 [CORE] Content Type: application/octet-stream
2026-06-26 00:17:46.892 [CORE] Download hash: cbf8dfcabfa6523dfa734d9c97b2b4ca4686c01efb39d671692b8d3dcaa3fd7c
2026-06-26 00:17:46.892 [CORE] Download completed.
2026-06-26 00:17:46.945 [CORE] Started trust validation of msix at: C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-06-26 00:17:46.985 [CORE] Result for certificate chain validation of Microsoft origin: 0
2026-06-26 00:17:47.021 [CORE] Result for trust info validation of the msix: 0
2026-06-26 00:17:47.022 [CORE] Starting AddPackage operation #0: file:///C:/Users/Administrator/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-06-26 00:17:47.022 [CORE] Begin waiting for operation #0
2026-06-26 00:17:47.022 [CORE] Begin blocking for operation #0
2026-06-26 00:17:47.098 [CORE] Deployment operation #0: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
2026-06-26 00:17:47.098 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF94DF9CA3B: (caller: 00007FF94DF98779) Exception(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.]
2026-06-26 00:17:47.104 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(96)\WindowsPackageManager.dll!00007FF94E0E2355: (caller: 00007FF94DFED4DA) LogHr(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF94DF9CA3B: (caller: 00007FF94DF98779) Exception(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.]
]
2026-06-26 00:17:47.104 [REPO] Source add/update failed, waiting 2519 milliseconds and retrying: winget
2026-06-26 00:17:49.624 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-06-26 00:17:49.624 [CORE] Retrieving headers from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-06-26 00:17:49.629 [REPO] Header indicates version is: 2026.625.2439.0
2026-06-26 00:17:49.629 [CORE] Downloading to path: C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-06-26 00:17:49.630 [CORE] Started applying motw to C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2026-06-26 00:17:49.630 [CORE] Finished applying motw
2026-06-26 00:17:49.631 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-06-26 00:17:49.635 [CORE] Download request status success.
2026-06-26 00:17:49.635 [CORE] Download size: 3227357
2026-06-26 00:17:49.635 [CORE] Content Type: application/octet-stream
2026-06-26 00:17:49.651 [CORE] Download hash: cbf8dfcabfa6523dfa734d9c97b2b4ca4686c01efb39d671692b8d3dcaa3fd7c
2026-06-26 00:17:49.651 [CORE] Download completed.
2026-06-26 00:17:49.689 [CORE] Started trust validation of msix at: C:\Users\Administrator\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-06-26 00:17:49.729 [CORE] Result for certificate chain validation of Microsoft origin: 0
2026-06-26 00:17:49.757 [CORE] Result for trust info validation of the msix: 0
2026-06-26 00:17:49.757 [CORE] Starting AddPackage operation #1: file:///C:/Users/Administrator/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-06-26 00:17:49.757 [CORE] Begin waiting for operation #1
2026-06-26 00:17:49.757 [CORE] Begin blocking for operation #1
2026-06-26 00:17:49.824 [CORE] Successfully completed #1
2026-06-26 00:17:49.830 [REPO] Additional sources GP is not enabled.
2026-06-26 00:17:49.830 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2026-06-26 00:17:49.830 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2026-06-26 00:17:49.830 [CORE] Admin settings was not found
2026-06-26 00:17:49.830 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
sfdataservice.microsoft.com : Subject | Issuer
2026-06-26 00:17:49.830 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
sfdataservice.microsoft.com : Subject | Issuer
2026-06-26 00:17:49.830 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2026-06-26 00:17:49.830 [YAML] Detected UTF-8
2026-06-26 00:17:49.830 [CORE] Setting action: Set, Type: Standard, Name: sources_metadata
2026-06-26 00:17:49.830 [REPO] Multiple sources available, creating aggregated source.
2026-06-26 00:17:49.830 [REPO] Adding to aggregated source: msstore
2026-06-26 00:17:49.831 [REPO] User agent caller found: winget-cli
2026-06-26 00:17:49.831 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2026-06-26 00:17:49.831 [REPO] Http GET request details:
GET / HTTP/1.1
Content-Type: application/json
User-Agent: winget-cli WindowsPackageManager/1.9.25200 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.24.25200.0
2026-06-26 00:17:49.852 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(847)\WindowsPackageManager.dll!00007FF94E0E2B97: (caller: 00007FF94DE33149) LogHr(2) tid(1544) 8A15005E Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\HttpClientHelper.cpp(34)\WindowsPackageManager.dll!00007FF94DFDEEF7: (caller: 00007FF94DD6C97C) Exception(2) tid(1544) 8A15005E ]
2026-06-26 00:17:49.852 [REPO] Failed to open available source: msstore
2026-06-26 00:17:49.852 [REPO] Adding to aggregated source: winget
2026-06-26 00:17:49.853 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-06-26 00:17:49.853 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FF94E008443: (caller: 00007FF94DFEDB14) Exception(3) tid(1544) 8A15000F
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(847)\WindowsPackageManager.dll!00007FF94E0E2B97: (caller: 00007FF94DE33149) LogHr(3) tid(1544) 8A15000F Msg:[C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FF94E008443: (caller: 00007FF94DFEDB14) Exception(3) tid(1544) 8A15000F ]
2026-06-26 00:17:49.853 [REPO] Failed to open available source: winget
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(854)\WindowsPackageManager.dll!00007FF94DFEDFE8: (caller: 00007FF94DE33149) Exception(4) tid(1544) 8A15004B
2026-06-26 00:17:49.860 [CLI ] Terminating context: 0x8a15004b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\WorkflowBase.cpp:dd
The key parts I've found is that winget goes to register/add/install the Microsoft.Winget.Source_8wekyb3d8bbwe MSIX package from https://cdn.winget.microsoft.com/cache/source2.msix. The first one fails with
2026-06-26 00:17:47.022 [CORE] Starting AddPackage operation #0: file:///C:/Users/Administrator/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-06-26 00:17:47.022 [CORE] Begin waiting for operation #0
2026-06-26 00:17:47.022 [CORE] Begin blocking for operation #0
2026-06-26 00:17:47.098 [CORE] Deployment operation #0: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
2026-06-26 00:17:47.098 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF94DF9CA3B: (caller: 00007FF94DF98779) Exception(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.]
2026-06-26 00:17:47.104 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(96)\WindowsPackageManager.dll!00007FF94E0E2355: (caller: 00007FF94DFED4DA) LogHr(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF94DF9CA3B: (caller: 00007FF94DF98779) Exception(1) tid(1544) 80073D19 An error occurred because a user was logged off.
Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2026.625.2439.0_neutral__8wekyb3d8bbwe from: failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.]
]
The second attempt "succeeds" but when it goes to try and use that package it fails to then find it
2026-06-26 00:17:49.757 [CORE] Starting AddPackage operation #1: file:///C:/Users/Administrator/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-06-26 00:17:49.757 [CORE] Begin waiting for operation #1
2026-06-26 00:17:49.757 [CORE] Begin blocking for operation #1
2026-06-26 00:17:49.824 [CORE] Successfully completed #1
...
2026-06-26 00:17:49.852 [REPO] Adding to aggregated source: winget
2026-06-26 00:17:49.853 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-06-26 00:17:49.853 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FF94E008443: (caller: 00007FF94DFEDB14) Exception(3) tid(1544) 8A15000F
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(847)\WindowsPackageManager.dll!00007FF94E0E2B97: (caller: 00007FF94DE33149) LogHr(3) tid(1544) 8A15000F Msg:[C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(446)\WindowsPackageManager.dll!00007FF94E008443: (caller: 00007FF94DFEDB14) Exception(3) tid(1544) 8A15000F ]
2026-06-26 00:17:49.853 [REPO] Failed to open available source: winget
2026-06-26 00:17:49.853 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(854)\WindowsPackageManager.dll!00007FF94DFEDFE8: (caller: 00007FF94DE33149) Exception(4) tid(1544) 8A15004B
2026-06-26 00:17:49.860 [CLI ] Terminating context: 0x8a15004b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\WorkflowBase.cpp:dd
If the source was setup in an interactive logon, like RDP, then winget list in SSH works at least for that current source package but if winget every needs to add it again for any reason it will fail in these non-interactive sessions.
Some things I've noticed is that even when winget list fails and the logs indicate that it successfully added on the second attempt, the package does NOT appear in Get-AppxPackage or in C:\Program Files\WindowsApps. I have no idea why the AddPackageAsync operation is saying it succeeded but in reality didn't but there's fundamentally no reason why it should fail in a non-interactive session.
I haven't looked into the msstore source problem but it's solved by having the user log on interactive once but I don't care too much about that one for now.
The only work around I have is to manually add the source package
$sourceUrl="https://cdn.winget.microsoft.com/cache/source2.msix"$tempPath="$env:TEMP\winget-source.msix"Invoke-WebRequest-Uri $sourceUrl-OutFile $tempPath-UseBasicParsing
Add-AppxPackage-Path $tempPathRemove-Item-Path $tempPath# winget list now works
I don't know of any way to get this URL and it's relying on an implementation detail
If it works for me in the exact same SSH session why is winget failing here
I've even used PowerShell to call the exact same AddPackageAsync API that winget is using and PowerShell works without any issues. There's something about the MSIX appcontainer that winget is running in that's causing problems.
Create a brand new Windows Server 2025 image, I'm using an Amazon EC2 instance. Create an admin user and make sure to never log on through RDP. Connect through SSH and run
# Ensure winget is provisioned for the user, this happens automatically# for an interactive logon but won't in SSH$package=Get-AppxProvisionedPackage-Online |Where-Object DisplayName -eq Microsoft.DesktopAppInstaller
Add-AppxPackage-RegisterByFamilyName -MainPackage $package.PackageName
winget list --disable-interactivity--accept-source-agreements --verbose
Expected behavior
winget list works
Actual behavior
> winget list
Failed when opening source(s); try the 'source reset' command if the problem persists.
> winget list -s winget
Failed when opening source(s); try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
Environment
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Server v10.0.26100.32995
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Relevant area(s)
WinGet CLI
Relevant command(s)
winget list
Brief description of your issue
When running winget in a non-interactive session, like ssh/winrm, any operations that need to setup the winget source will fail. By default 2 sources seem to be available out of the box
msstoreandwingetwheremsstorewon't work until at least one interactive logon has happened for that user andwingetwhich fails to register theMicrosoft.Winget.Source_8wekyb3d8bbwepackage.On investigation I can see in the winget logs the following
The key parts I've found is that winget goes to register/add/install the
Microsoft.Winget.Source_8wekyb3d8bbweMSIX package fromhttps://cdn.winget.microsoft.com/cache/source2.msix. The first one fails withThe second attempt "succeeds" but when it goes to try and use that package it fails to then find it
If the source was setup in an interactive logon, like RDP, then
winget listin SSH works at least for that current source package but if winget every needs to add it again for any reason it will fail in these non-interactive sessions.Some things I've noticed is that even when
winget listfails and the logs indicate that it successfully added on the second attempt, the package does NOT appear inGet-AppxPackageor inC:\Program Files\WindowsApps. I have no idea why theAddPackageAsyncoperation is saying it succeeded but in reality didn't but there's fundamentally no reason why it should fail in a non-interactive session.I haven't looked into the
msstoresource problem but it's solved by having the user log on interactive once but I don't care too much about that one for now.The only work around I have is to manually add the source package
This is not a good workaround because
I've even used PowerShell to call the exact same AddPackageAsync API that winget is using and PowerShell works without any issues. There's something about the MSIX appcontainer that winget is running in that's causing problems.
I assume this is a duplicate of these two issues
Steps to reproduce
Create a brand new Windows Server 2025 image, I'm using an Amazon EC2 instance. Create an admin user and make sure to never log on through RDP. Connect through SSH and run
Expected behavior
winget listworksActual behavior
Environment