From d321688801d7e104f695984451e65b76dafe743d Mon Sep 17 00:00:00 2001 From: Jan Egil Ring Date: Mon, 17 Nov 2025 11:49:49 +0100 Subject: [PATCH] fix: update ALZ module version checks to use Get-InstalledPSResource and Find-PSResource Signed-off-by: Jan Egil Ring --- src/ALZ/Private/Tools/Test-Tooling.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ALZ/Private/Tools/Test-Tooling.ps1 b/src/ALZ/Private/Tools/Test-Tooling.ps1 index e016cbe..b6cadff 100644 --- a/src/ALZ/Private/Tools/Test-Tooling.ps1 +++ b/src/ALZ/Private/Tools/Test-Tooling.ps1 @@ -160,7 +160,8 @@ function Test-Tooling { } else { # Check if latest ALZ module is installed Write-Verbose "Checking ALZ module version" - $alzModuleCurrentVersion = Get-InstalledModule -Name ALZ -ErrorAction SilentlyContinue + $alzModuleCurrentVersion = Get-InstalledPSResource -Name ALZ | Select-Object -Property Name, Version + if($null -eq $alzModuleCurrentVersion) { $checkResults += @{ message = "ALZ module is not correctly installed. Please install the latest version using 'Install-Module ALZ'." @@ -168,7 +169,7 @@ function Test-Tooling { } $hasFailure = $true } - $alzModuleLatestVersion = Find-Module -Name ALZ + $alzModuleLatestVersion = Find-PSResource -Name ALZ if ($null -ne $alzModuleCurrentVersion) { if ($alzModuleCurrentVersion.Version -lt $alzModuleLatestVersion.Version) { $checkResults += @{