[Windows 19 & 22] Remove AzureRM and Azure powershell modules from windows images (#11548)

* remove azure poswershell modules

* Update helper scripts
This commit is contained in:
kishorekumar-anchala
2025-03-03 07:29:18 +00:00
committed by GitHub
parent a88fc4db06
commit f0e516bc43
4 changed files with 1 additions and 50 deletions

View File

@@ -191,8 +191,7 @@ function Get-ModuleVersionAsJob {
$modulePath,
$moduleName
)
# Disable warning messages to prevent additional warnings about Az and Azurerm modules in the same session
$WarningPreference = "SilentlyContinue"
# No need to suppress AzureRM warnings now, only Az module is considered
$env:PsModulePath = "$modulePath;$env:PsModulePath"
Import-Module -Name $moduleName
(Get-Module -Name $moduleName).Version.ToString()