$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