1
1
function Get-AzureIPRangesAndServiceTags {
2
2
<#
3
3
. SYNOPSIS
4
+
4
5
Retrieve the Ip address ranges and Service Tags ranges for Azure (Public, USgov, Germnay or China)
5
6
The function return a Json. This can be passed to '|Converfrom-json' if you wish
6
7
to get a PowerShell object.
7
8
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
+
8
16
. DESCRIPTION
9
17
10
18
This 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
21
29
service tags might not be available in all clouds and regions.
22
30
For more information please visit http://aka.ms/servicetags
23
31
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
+
24
62
#>
25
63
[CmdletBinding ()]
26
64
param (
0 commit comments