While looping through Azure VMs in powershell I want to get only VMs which have specific tag available in those

前端 未结 0 940
既然无缘
既然无缘 2021-01-07 23:49
     Get-AzVM | Where-Object{$_.ResourceGroupName -eq "somename" -and $_.Tags.Keys -like "tagName*"} | ForEach-Object {
    Write-Output($_.Name)         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题