Files
Sandbox/Azure-PullTags.ps1
T
Zack Meier 03dba08135 sync
2026-04-15 15:42:41 -05:00

22 lines
366 B
PowerShell

$AllWebApps = Get-AzureRMWebApp
$result = @()
ForEach($app in $AllWebApps)
{
$hash = @{
'Name' = $app.Name;
'Location' = $app.Location;
}
$Tags = $app.tags
ForEach($TagKey in $Tags.Keys)
{
$hash += @{$TagKey = $Tags.$TagKey}
}
$obj = New-Object -TypeName psobject -Property $hash
$result += $obj
}
$result