microsoft / microsoft/winget-cli
Receive `Specified method is not supported.` for multiple module cmdlets under SYSTEM context.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
It's been exciting to see 1.6.3133.0 of the PowerShell module, its really starting to come together.
While the main cmdlets like Get-WinGetPackage, Install-WinGetPackage and Uninstall-WinGetPackage are working well, other ones that I require such as Get-WinGetVersion and Repair-WinGetPackageManager are not, and they're crucial as during a Windows Autopilot sequence, I need to ensure an appropriate version of WinGet is available vs. whatever the system ships with.
Steps to reproduce
- Open PowerShell 7.x as SYSTEM
- Call
Get-WinGetVersionand observe error occurs.
Expected behavior
C:\Windows\System32>pwsh.exe -ExecutionPolicy Bypass -MTA
PowerShell 7.4.0
PS C:\Windows\System32> whoami
nt authority\system
PS C:\Windows\System32> Get-WinGetVersion
v1.6.3133
PS C:\Windows\System32>
Actual behavior
C:\Windows\System32>pwsh.exe -ExecutionPolicy Bypass -MTA
PowerShell 7.4.0
PS C:\Windows\System32> whoami
nt authority\system
PS C:\Windows\System32> Get-WinGetVersion
Get-WinGetVersion: Specified method is not supported.
PS C:\Windows\System32>
Environment
Windows Package Manager v1.6.3133
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.2715
System Architecture: X64
Winget Directories
------------------------------------------------------------------------------------------------------
Logs %TEMP%\WinGet\defaultState
User Settings %LOCALAPPDATA%\Microsoft\WinGet\Settings\defaultState\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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Reproduce the failure under a SYSTEM PowerShell 7.x session, then trace the module entry points for Get-WinGetVersion and Repair-WinGetPackageManager; done means these cmdlets work in that context and Get-WinGetVersion returns the installed WinGet version instead of the unsupported-method error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100