Last active
January 12, 2021 19:43
-
-
Save dmauser/988c2d686b264c0295f8be8937435d6c to your computer and use it in GitHub Desktop.
Script dumps IP range info associated to Service Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dumping Service Tags IP Ranges. | |
# 1) Specify target region variable. | |
$serviceTags = Get-AzNetworkServiceTag -Location uksouth | |
# 2) Get all service tags that can be queried | |
$serviceTags.Values.Name | |
# 3) Example dumping info for SQL service tag info on UK South (SQL.uksouth). You can replace with any value dumped on step 2. | |
$tag = $serviceTags.Values | Where-Object { $_.Name -eq "SQL.uksouth" } | |
# 4) Example dumps amount of Prefixes. | |
$tag.Properties.AddressPrefixes.count | |
# 5) Example dumping all Address Spaces used by specific Serive Tag | |
$tag.Properties.AddressPrefixes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment