From e8aa1b5b4aa2e7a155e5f767f375b422d8c3bed1 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 15:19:12 -0700 Subject: [PATCH] Get instead of import, as an array, and get the best available --- FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 index e0fdd04..68c152c 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 @@ -323,7 +323,7 @@ function Confirm-WingetInstallationUI { # Initial Check WriteLog "Confirm-WingetInstallationUI: Starting checks..." $cliStatus = Test-WingetCLI - $module = Import-Module -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue -PassThru -Global + $module = $module = @(Get-InstalledModule -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue) | Sort-Object -Top 1 -Descending Version -ErrorAction SilentlyContinue $result.CliVersion = $cliStatus.Version $result.ModuleVersion = if ($null -ne $module) { $module.Version.ToString() } else { "Not installed" }