You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows Server 2019
Question
Hi,
I run the Inline Script in Azure PowerShell task, I get the following Warning in Pipeline output:
"You're using AzureRM which will be retired soon, please schedule an update."
What is AzureRM in this script, please?# Stop Azure VMs
Get-AzVM -ResourceGroupName $(ResourceGroupName1)| Stop-AzVM -NoWait -Force
# Get Azure VM status$vm = Get-AzVM -ResourceGroupName $(ResourceGroupName1) -Status
# Wait for the virtual machines to stop$expectedStatus = "VM deallocated"
foreach ($vmsin$vm) {
$statuscheck = Get-AzVM -ResourceGroupName $vms.ResourceGroupName -Name $vms.Name -Status
while ($statuscheck.Statuses.DisplayStatus[1] -ne $expectedStatus) {
Start-Sleep -Seconds 1
Get-Date -Format "MM/dd/yyyy HH:mm.s"
Write-Output "Stopping virtual machine: $($vms.Name)"$statuscheck = Get-AzVM -ResourceGroupName $vms.ResourceGroupName -Name $vms.Name -Status
Write-Output "Virtual machine state: $($statuscheck.Statuses.DisplayStatus[1])"
}
Write-output "Virtual machine $($vms.Name) is already in stopped state."
}
The text was updated successfully, but these errors were encountered:
Hi @mariankral, thank you for the question.
Right now our team is working on switching from AzureRM (which no longer supported from 29/02/2024) to Az. You can find some details in #19843 (comment).
If you'd like to help our team and switch to the new Az you can add environment or pipeline variable RETIRE_AZURERM_POWERSHELL_MODULE and set it to true. This will dismiss this warning and the task will be use only Az package to connect with Azure.
Task name
Azure PowerShell
Task version
5.*
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows Server 2019
Question
The text was updated successfully, but these errors were encountered: