Skip to content

[BUG] PowerShellGet 1.x (Update-Module) has no -Scope parameter (Microsoft.WinGet.Client can't be updated) #2814

Closed

Description

@Mertsch

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.2.beta3

Windows version, edition, and architecture

Windows 10

Describe your issue

I am not making sure all my PowerShell 5.x modules are up to date. So apparently I "only" have PowerShellGet 1.x and get the following error

Starting package update operation for package id=Microsoft.WinGet.Client with Manager name=PowerShell
Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
Process Executable     : C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
Process Call Arguments :  -NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser
Working Directory      : C:\Users\Mertsch
Process Start Time     : 04.10.2024 10:35:32
Update-Module : A parameter cannot be found that matches parameter name 'Scope'.
At line:1 char:68
+ ... e -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope Current ...
+                                                            ~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Update-Module], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Update-Module
Process Exit Code      : 1
Process End Time       : 04.10.2024 10:35:33

https://learn.microsoft.com/en-us/powershell/module/powershellget/update-module?view=powershellget-1.x
Has noscope (pun intended)
While
https://learn.microsoft.com/en-us/powershell/module/powershellget/update-module?view=powershellget-2.x
or 3.x has

Can UniGet update "PowerShellGet", too?!
Or at least check if 2.x+ is installed?!

Steps to reproduce the issue

No response

UniGetUI Log

[04.10.2024 09:55:48]    __  __      _ ______     __  __  ______
                        / / / /___  (_) ____/__  / /_/ / / /  _/
                       / / / / __ \/ / / __/ _ \/ __/ / / // /
                      / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                      \____/_/ /_/_/\____/\___/\__/\____/___/
                          Welcome to UniGetUI Version 3.1.2-beta3
[04.10.2024 09:55:48]
[04.10.2024 09:55:48] Version Code:  3,1193
[04.10.2024 09:55:48] Encoding Code Page set to 437
[04.10.2024 09:55:48] Using bundled GSudo at C:\Program Files\UniGetUI\Assets\Utilities\gsudo.exe
[04.10.2024 09:55:49] Loaded language locale: en
[04.10.2024 09:55:49] Starting update check
[04.10.2024 09:55:49] Could not download updated translations from GitHub
[04.10.2024 09:55:50] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
                       ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
                       ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
                         --- End of inner exception stack trace ---
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
                         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
                         at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         --- End of inner exception stack trace ---
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
                         at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
                         at UniGetUI.Core.Language.LanguageEngine.DownloadUpdatedLanguageFile(String LangKey) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.LanguageEngine\LanguageEngine.cs:line 137
[04.10.2024 09:55:50] Failed to download icons and screenshots
[04.10.2024 09:55:50] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
                       ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
                       ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
                         --- End of inner exception stack trace ---
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                         at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
                         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
                         at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
                         at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         --- End of inner exception stack trace ---
                         at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
                         at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                         at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                         at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
                         at UniGetUI.Core.IconEngine.IconDatabase.LoadIconAndScreenshotsDatabaseAsync() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.IconStore\IconDatabase.cs:line 70
[04.10.2024 09:55:50] Old chocolatey path does not exist, not migrating Chocolatey
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Chocolatey
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Begin "which" search for command npm
[04.10.2024 09:55:50] Begin "which" search for command pwsh.exe
[04.10.2024 09:55:50] Begin "which" search for command python.exe
[04.10.2024 09:55:50] Begin "which" search for command cargo
[04.10.2024 09:55:50] Begin "which" search for command dotnet.exe
[04.10.2024 09:55:50] Begin "which" search for command winget.exe
[04.10.2024 09:55:50] UniGetUI is up to date
[04.10.2024 09:55:50] Command npm was found on C:\Program Files\nodejs\npm
[04.10.2024 09:55:50] Command cargo was not found on the system
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Cargo
                      █ Enabled: True
                      █ Found: False
                      █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                      █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Command dotnet.exe was found on C:\Program Files\dotnet\dotnet.exe
[04.10.2024 09:55:50] Command python.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
[04.10.2024 09:55:50] Command pwsh.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\pwsh.exe
[04.10.2024 09:55:50] Command winget.exe was found on C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\winget.exe
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Pip
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Begin "which" search for command scoop
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: .NET Tool
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: dotnet tool
                      █ Executable path: C:\Program Files\dotnet\dotnet.exe
                      █ Call arguments: tool
                      █ Version: 
                      █   8.0.402
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Command scoop was not found on the system
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Scoop
                      █ Enabled: False
                      █ THE MANAGER IS DISABLED
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] Loaded 2 sources for manager Winget
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Winget
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: winget.exe
                      █ Executable path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\winget.exe
                      █ Call arguments: 
                      █ Version: 
                      █   System WinGet CLI Version: v1.8.1911
                      █   Using Native WinGet helper (COM Api)
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:50] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: Npm
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: npm
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command npm
                      █ Version: 
                      █   10.9.0
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] Loaded 1 sources for manager PowerShell7
[04.10.2024 09:55:53] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell7
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: pwsh.exe
                      █ Executable path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\pwsh.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   PowerShell 7.4.5
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] Loaded 1 sources for manager PowerShell
[04.10.2024 09:55:53] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                      █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                      █ Name: PowerShell
                      █ Enabled: True
                      █ Found: True
                      █ Fancy exe name: powershell.exe
                      █ Executable path: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
                      █ Call arguments:  -NoProfile -Command
                      █ Version: 
                      █   Name                           Value                                                                                   
                      █   ----                           -----                                                                                   
                      █   PSVersion                      5.1.19041.4957                                                                          
                      █   PSEdition                      Desktop                                                                                 
                      █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                      █   BuildVersion                   10.0.19041.4957                                                                         
                      █   CLRVersion                     4.0.30319.42000                                                                         
                      █   WSManStackVersion              3.0                                                                                     
                      █   PSRemotingProtocolVersion      2.3                                                                                     
                      █   SerializationVersion           1.1.0.1
                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[04.10.2024 09:55:53] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[04.10.2024 09:55:53] Manager Npm has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager .NET Tool has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager PowerShell has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Manager PowerShell7 has not implemented RefreshPackageIndexes
[04.10.2024 09:55:53] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Loaded 2 sources for manager Winget
[04.10.2024 09:55:53] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Found 3 installed packages from .NET Tool
[04.10.2024 09:55:53] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 09:55:53] Dependency .NET Tools Outdated for manager .NET Tool is present
[04.10.2024 09:55:54] Ignored updates database was never loaded, so it is going to be loaded now
[04.10.2024 09:55:54] Found 0 available updates from .NET Tool
[04.10.2024 09:55:55] Found 1 installed packages from Npm
[04.10.2024 09:55:55] Found 2 installed packages from PowerShell7
[04.10.2024 09:55:55] Loaded 1 sources for manager PowerShell7
[04.10.2024 09:55:55] Found 0 available updates from Npm
[04.10.2024 09:55:56] Loaded 1 sources for manager PowerShell
[04.10.2024 09:55:56] Found 3 installed packages from PowerShell
[04.10.2024 09:55:58] Found 1 available updates from PowerShell
[04.10.2024 09:56:01] Found 0 available updates from PowerShell7
[04.10.2024 09:56:01] Found 4 available updates from Winget
[04.10.2024 09:56:01] Found 279 installed packages from Winget
[04.10.2024 09:56:01] Invalid value for UpdatesCheckInterval, using default value of 3600 seconds
[04.10.2024 10:35:32] Creating new instance of InstallationOptions for package UniGetUI.PackageEngine.PackageClasses.Package, as no instance was found in cache
[04.10.2024 10:35:32] Loaded operation parameters for package id=Microsoft.WinGet.Client on manager PowerShell and operation Update: Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser
[04.10.2024 10:35:32] No Icon URL could be parsed on the manifest Url=https://www.powershellgallery.com/api/v2/Packages(Id='Microsoft.WinGet.Client',Version='1.8.1911')
[04.10.2024 10:35:32] Manager PowerShell did not find a native icon for Microsoft.WinGet.Client
[04.10.2024 10:35:32] Icon id for package=Microsoft.WinGet.Client is microsoft.winget.client
[04.10.2024 10:35:32] Icon for package Microsoft.WinGet.Client was not found, returning default icon
[04.10.2024 10:35:32] Icon for package Microsoft.WinGet.Client was loaded from ms-appx:///Assets/Images/package_color.png
[04.10.2024 10:37:27] Manager PowerShell has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager .NET Tool has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager PowerShell7 has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Manager Npm has not implemented RefreshPackageIndexes
[04.10.2024 10:37:27] Begin "which" search for command dotnet-tools-outdated.exe
[04.10.2024 10:37:27] Command dotnet-tools-outdated.exe was found on C:\Users\XXX\.dotnet\tools\dotnet-tools-outdated.exe
[04.10.2024 10:37:27] Found 0 available updates from .NET Tool
[04.10.2024 10:37:28] Found 0 available updates from Npm
[04.10.2024 10:37:31] Found 0 available updates from PowerShell
[04.10.2024 10:37:32] Found 8 available updates from Winget
[04.10.2024 10:37:33] Found 0 available updates from PowerShell7
[04.10.2024 10:37:33] Invalid value for UpdatesCheckInterval, using default value of 3600 seconds

Package Managers Logs

Manager WinGet with version:
System WinGet CLI Version: v1.8.1911
Using Native WinGet helper (COM Api)

——————————————————————————————————————————


Logged native task on manager Winget. Task type is ListSources
Process start time: 04.10.2024 09:55:50
Process end time:   04.10.2024 09:55:50

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Mertsch\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:55:56

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:56:01

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListSources
Process start time: 04.10.2024 09:55:53
Process end time:   04.10.2024 09:55:53

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04.10.2024 09:55:56
Process end time:   04.10.2024 09:56:01

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\Mertsch\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 04.10.2024 10:37:27
Process end time:   04.10.2024 10:37:28

-- Process STDOUT
 ...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04.10.2024 10:37:28
Process end time:   04.10.2024 10:37:32

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Relevant information

No response

Screenshots and videos

No response

Activity

  1. added
    bug
    on Oct 4, 2024
  2. Mertsch commented on Oct 4, 2024

    @Mertsch
    ContributorAuthor
    PS> update-Module PowerShellGet
    update-Module : Module 'PowerShellGet' (installed at'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0')
    cannot be updated because Administrator rights are required to change that directory. Log on to the computer with an
    account that has Administrator rights, and then try again. You can also try running the Windows PowerShell session
    with elevated rights (Run as Administrator).
    

    Apparently 1.6.0 is so old it can't update itself anymore

    PS> update-Module PowerShellGet
    PackageManagement\Install-Package : Unable to find repository 'https://www.powershellgallery.com/api/v2/'. Use
    Get-PSRepository to see all available repositories.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0\PSModule.psm1:2349 char:20
    + ...           $sid = PackageManagement\Install-Package @PSBoundParameters
    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
       ception
        + FullyQualifiedErrorId : SourceNotFound,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
    

    After running Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force it works again.

    Note: My Win10 is an upgraded Win7 from 2009.

    Apparently it stopped 2017
    2024-10-04 11-06-43 WinMergeU

  3. marticliment commented on Oct 4, 2024

    @marticliment
    Collaborator

    I will investigate, but Windows 10/11 is supposed to come with PowerShellGet v2 by default, perhaps the fact that your pc is a Win7 upgrade could explain why this issue is happening

  4. Kiina commented on Oct 13, 2024

    @Kiina

    Noticed I had the same issue, so I came here.

    Tried updating it:

    update-Module PowerShellGet
    Update-Module: Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated
    

    Looking at the folder listed above it seems I have version 1.0.0.1. Get-InstalledModule shows absolutely nothing.

    After running Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force it works again.

    Tried it.

    WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.
    

    Had to remove the folder by hand. Then I noticed uniget was running in a completly different powershell. The one from C:\Windows\System32\WindowsPowerShell\v1.0 that gets called

    $PSVersionTable.PSVersion
    
    Major  Minor  Build  Revision
    -----  -----  -----  --------
    5      1      22621  4249
    

    While the regular powershell I use:

    $PSVersionTable.PSVersion
    
    Major  Minor  Patch  PreReleaseLabel BuildLabel
    -----  -----  -----  --------------- ----------
    7      4      5
    

    So I had to rerun the same command in the older powershell that gets used by uniget. No idea why they seem to not share packages.....

  5. Mertsch commented on Oct 14, 2024

    @Mertsch
    ContributorAuthor

    PowerShell 5.1 is the one inside of Windows which will remain as-is, because Microsoft doesn't want to break existing users (and leverage Windows-only-features)
    PowerShell 6.x -> 7.x are the "new" PowerShell, as in the "new" Outlook, and are updated regularly with a much shorter support cycle (the one from Windows is decades).
    Just like .NET vs .NET Framework.

    So UniGet supports both, but apparently 5.1 can be broken (by something).

  6. jmclaren7 commented on Oct 29, 2024

    @jmclaren7

    Same thing here. I'm on a Windows 11 install that was a clean install at the time. I had powershellget 1.0.0.1 and no matter what I tried I couldn't get to to upgrade. The only thing that worked was replacing PowerShellGet and PackageManagement in program files with manually downloaded versions.

    Looking back in the console of all the things I tried, i just noticed I missed this error about the -AllowClobber parameter so no idea if it would have helped:

    PS C:\> Install-Module -Name PowerShellGet -Force
    PackageManagement\Install-Package : The following commands are already available on this
    system:'Find-Package,Install-Package,Uninstall-Package'. This module 'PackageManagement' may override the existing
    commands. If you still want to install this module 'PackageManagement', use -AllowClobber parameter.
    At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
    

    So maybe something like this would have helped:

    Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force -AllowClobber
    

    I'm available to do more testing or try to reproduce this more if it would help.

  7. Mertsch commented on Oct 29, 2024

    @Mertsch
    ContributorAuthor

    Indeed, I have installed Win 11 24H2, as new as it gets, and it has version 1.0.0.1. Really weird.

  8. Mertsch commented on Oct 29, 2024

    @Mertsch
    ContributorAuthor

    And also interesting, it seems to be on purpose
    PS> update-module powershellget update-module : Module 'powershellget' was not installed by using Install-Module, so it cannot be updated.

  9. Mertsch commented on Oct 29, 2024

    @Mertsch
    ContributorAuthor

    And 3rd update 😄 The -Scope is present, so it seems that MS wants to lock down this module (sadly with version 1.x) and we can't really make good decisions based on the version number.

    It would require some mechanism of detecting a "Locked down version 1" and keep it. Or notify about an outdated "installable" version.
    OR
    Maybe just use "Get-Help" to see if -NoScope is a thing. I dunno 😶‍🌫️

    PS> get-help update-module
    
    NAME
        Update-Module
    
    SYNTAX
        Update-Module [[-Name] <string[]>] [-RequiredVersion <string>] [-MaximumVersion <string>] [-Credential
        <pscredential>] [-Scope {CurrentUser | AllUsers}] [-Proxy <uri>] [-ProxyCredential <pscredential>] [-Force]
        [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
    
  10. CodeNeedsCoffee commented on Nov 1, 2024

    @CodeNeedsCoffee

    For anyone looking for a temporary workaround, you can go into the installation options and add an additional parameter similar to the following:
    > nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"
    Which then allows the update to complete successfully due to the suppression of errors plus the piping allows the command to be ran separately from the scope since the scope is appended at the end:
    image

    Alternatively, you could remove the null suppression so any errors do bubble up:
    || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

  11. changed the title [-][BUG] PowerShellGet 1.x (Update-Module) has no -Scope parameter[/-] [+][BUG] PowerShellGet 1.x (Update-Module) has no -Scope parameter (Microsoft.WinGet.Client can't be updated)[/+] on Nov 2, 2024
  12. 2 remaining items

  13. marticliment commented on Nov 14, 2024

    @marticliment
    Collaborator

    I have fixed the issue. Please wait for the next beta release and test if the issue gets resolved for you. I will let you know when a new beta release is available.

  14. added a commit that references this issue on Nov 15, 2024
    8c938db
  15. Paul051962 commented on Nov 18, 2024

    @Paul051962

    Für alle, die nach einer vorübergehenden Problemumgehung suchen, können Sie in die Installationsoptionen gehen und einen zusätzlichen Parameter hinzufügen, der dem folgenden ähnelt: Dadurch kann das Update aufgrund der Unterdrückung von Fehlern erfolgreich abgeschlossen werden, und das Piping ermöglicht es, den Befehl getrennt vom Bereich auszuführen, da der Bereich am Ende angehängt wird: > nul || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"Bild
    Alternativ können Sie die Nullunterdrückung entfernen, damit Fehler auftreten: || "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -NoProfile -Command Write-Output "Updated"

    Danke, es hat bei mir funktioniert!

    Danke, auch bei mir wurde das Problem behoben.

  16. kirashi3 commented on Nov 23, 2024

    @kirashi3

    Please try this new release: https://github.com/marticliment/UniGetUI/releases/tag/3.1.4-beta1

    • I was experiencing what I believe to be the same issue described by Mertsch when using UniGetUI 3.1.3
    • Updating package "Microsoft.WinGet.Client" completed successfully after installing UniGetUI 3.1.4-beta1. 👍

    Also, I have enabled the install prerelease versions of UniGetUI Setting so I'll keep an eye out for future bugs.

    Starting package update operation for package id=Microsoft.WinGet.Client with Manager name=PowerShell
    Given installation options are <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
    Process Executable     : C:\Windows\system32\windowspowershell\v1.0\powershell.exe
    Process Call Arguments :  -NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force
    Working Directory      : C:\Users\KiRaShi
    Process Start Time     : 2024-11-22 22:05:30
    Process Exit Code      : 0
    Process End Time       : 2024-11-22 22:05:39
    
  17. srlennon commented on Dec 17, 2024

    @srlennon

    My fix was simple on Windows 11 24H2, I just decided to run the update manually in a PowerShell 5.1 Terminal Window (run as Administrator) and then used the following command:

    powershell.exe Update-Module -Name Microsoft.WinGet.Client -Force

    Update completed and UniGetUI no longer says any update is needed for Microsoft.WinGet.Client (Hooray. No updates were found.)

    For reference my Powershell 5.1 version info is:
    ❯ $PSVersionTable

    Name Value


    PSVersion 5.1.26100.2161
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.26100.2161
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1

  18. removed this from the Bugs milestone on Dec 18, 2024
  19. escalonn commented on Feb 25, 2025

    @escalonn

    issue came back, again, with winget 1.10, had to update manually outside unigetui as above.

  20. ejvanloon commented on Feb 26, 2025

    @ejvanloon

    Same here:

    Package update operation for Package=Microsoft.WinGet.Client with Manager=PowerShell
    Installation options: <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
    Executing process with StartInfo:
     - FileName: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
     - Arguments: "-NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser"
    Start Time: "26-2-2025 08:49:32"
    Update-Module : A parameter cannot be found that matches parameter name 'Scope'.
    At line:1 char:68
    + ... e -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope Current ...
    +                                                            ~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Update-Module], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Update-Module
    End Time: "26-2-2025 08:49:32"
    Process return value: "1" (0x1)
    Microsoft.WinGet.Client could not be updated
    
  21. marticliment commented on Feb 26, 2025

    @marticliment
    Collaborator

    Does latest beta (3.1.7-beta1) work? It should have this issue fixed

  22. smbrannon commented on Feb 27, 2025

    @smbrannon

    Does latest beta (3.1.7-beta1) work? It should have this issue fixed

    Fixed it for me: Win 10

    Image

  23. MasterMik commented on Feb 27, 2025

    @MasterMik

    Fixed it for me too.

    Image

  24. ejvanloon commented on Feb 28, 2025

    @ejvanloon

    Same here:

    Package update operation for Package=Microsoft.WinGet.Client with Manager=PowerShell
    Installation options: <InstallationOptions: SkipHashCheck=False;InteractiveInstallation=False;RunAsAdministrator=False;Version=;Architecture=;InstallationScope=;InstallationScope=;CustomParameters=;RemoveDataOnUninstall=False>
    Executing process with StartInfo:
     - FileName: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
     - Arguments: "-NoProfile -Command Update-Module -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope CurrentUser"
    Start Time: "26-2-2025 08:49:32"
    Update-Module : A parameter cannot be found that matches parameter name 'Scope'.
    At line:1 char:68
    + ... e -Name Microsoft.WinGet.Client -Confirm:$false -Force -Scope Current ...
    +                                                            ~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Update-Module], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Update-Module
    End Time: "26-2-2025 08:49:32"
    Process return value: "1" (0x1)
    Microsoft.WinGet.Client could not be updated
    

    Just received another update of WinGet: after upgrading to 3.1.7-beta1, updating indeed works OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugready-to-go

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions