Skip to content

Instantly share code, notes, and snippets.

@michaelkc
Last active May 25, 2022 10:48
Show Gist options
  • Save michaelkc/2c014c48f6afe7bd2b20e825022cdec5 to your computer and use it in GitHub Desktop.
Save michaelkc/2c014c48f6afe7bd2b20e825022cdec5 to your computer and use it in GitHub Desktop.
Application Insights data ingestion caps
$status = @()
foreach ($sub in Get-AzSubscription)
{
Set-AzContext -Subscription $sub |out-null
foreach ($appInsights in Get-AzApplicationInsights)
{
$details = Get-AzApplicationInsights -Name $appInsights.Name -ResourceGroupName $appInsights.ResourceGroupName -Full
$status+=(
@{
Name = $appInsights.Name
Subscription = "$($sub.Id) ($($sub.Name))"
ResourceGroupName = $appInsights.ResourceGroupName
CapGB = $details.Cap
IsCapped = $details.IsCapped
}|Select-Object Name, ResourceGroupName, Subscription, CapGB, IsCapped)
}
}
$status | ft -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment