Get-AzVM | Where-Object{$_.ResourceGroupName -eq "somename" -and $_.Tags.Keys -like "tagName*"} | ForEach-Object { Write-Output($_.Name)