11function Get-AzureIPRangesAndServiceTags {
22<#
33. SYNOPSIS
4+
45Retrieve the Ip address ranges and Service Tags ranges for Azure (Public, USgov, Germnay or China)
56The function return a Json. This can be passed to '|Converfrom-json' if you wish
67to get a PowerShell object.
78
9+ This information is pulled from Microsoft Download pages.
10+
11+ 'Public' = 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519'
12+ 'USGov' = 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57063'
13+ 'China' = 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57062'
14+ 'Germany' = 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57064'
15+
816. DESCRIPTION
917
1018This file contains the IP address ranges for Public Azure as a whole, each
@@ -21,6 +29,36 @@ the Network Security Group rules for your Azure deployments though some
2129service tags might not be available in all clouds and regions.
2230For more information please visit http://aka.ms/servicetags
2331
32+ . PARAMETER Cloud
33+ Specify the type of cloud.
34+ Default is 'Public'
35+
36+ Accepted Values: 'Public','USGov','Germany','China'
37+ . EXAMPLE
38+ Get-AzureIPRangesAndServiceTags
39+
40+ Retrieve the IP Ranges and Service Tags Ranges for Public Cloud
41+ This will output the Json File
42+
43+ . EXAMPLE
44+ Get-AzureIPRangesAndServiceTags | ConvertFrom-Json
45+
46+ Retrieve the IP Ranges and Service Tags Ranges for Public Cloud
47+ The Json is converted to a PowerShell Object
48+
49+ . EXAMPLE
50+ Get-AzureIPRangesAndServiceTags -Cloud China
51+
52+ Retrieve the IP Ranges and Service Tags Ranges for China
53+ This will output the Json File
54+
55+ . NOTES
56+ Version History
57+ 1.0 | 2020/01/14 | Francois-Xavier Cat
58+ Initial version
59+ . LINK
60+ https://github.com/lazywinadmin/PowerShell
61+
2462#>
2563[CmdletBinding ()]
2664param (
0 commit comments