[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

@@ -235,14 +235,6 @@ $psTools.AddToolVersion("PowerShell", $(Get-PowershellCoreVersion))
$psModules = $psTools.AddHeader("Powershell Modules") $psModules = $psTools.AddHeader("Powershell Modules")
$psModules.AddNodes($(Get-PowerShellModules)) $psModules.AddNodes($(Get-PowerShellModules))
$azPsNotes = @'
Azure PowerShell module 2.1.0 and AzureRM PowerShell module 2.1.0 are installed
and are available via 'Get-Module -ListAvailable'.
All other versions are saved but not installed.
'@
if (-not (Test-IsWin25)) {
$psModules.AddNote($azPsNotes)
}
# Android # Android
$android = $installedSoftware.AddHeader("Android") $android = $installedSoftware.AddHeader("Android")

View File

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

View File

@@ -93,26 +93,6 @@
{"name": "AWSPowershell"} {"name": "AWSPowershell"}
], ],
"azureModules": [ "azureModules": [
{
"name": "azurerm",
"versions": [
"6.13.1"
],
"zip_versions": [
"6.7.0"
],
"default": "6.13.1"
},
{
"name": "azure",
"versions": [
"5.3.0"
],
"zip_versions": [
"5.1.1"
],
"default": "5.3.0"
},
{ {
"name": "az", "name": "az",
"versions": [ "versions": [

View File

@@ -92,26 +92,6 @@
{"name": "AWSPowershell"} {"name": "AWSPowershell"}
], ],
"azureModules": [ "azureModules": [
{
"name": "azurerm",
"versions": [
"6.13.1"
],
"zip_versions": [
"6.7.0"
],
"default": "6.13.1"
},
{
"name": "azure",
"versions": [
"5.3.0"
],
"zip_versions": [
"5.1.1"
],
"default": "5.3.0"
},
{ {
"name": "az", "name": "az",
"versions": [ "versions": [