@@ -23,17 +23,144 @@ The **Get-AzNetworkServiceTag** cmdlet gets the list of service tag information
23
23
24
24
### Example 1
25
25
``` powershell
26
- PS C:\> Get-AzNetworkServiceTag -Location eastus2
26
+ PS C:\> $serviceTags = Get-AzNetworkServiceTag -Location eastus2
27
+ PS C:\> $serviceTags
27
28
28
29
Name : Public
29
30
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/providers/Microsoft.Network/serviceTags/Public
30
31
Type : Microsoft.Network/serviceTags
31
32
ChangeNumber : 63
32
33
Cloud : Public
33
34
Values : {ApiManagement, ApiManagement.AustraliaCentral, ApiManagement.AustraliaCentral2, ApiManagement.AustraliaEast...}
35
+
36
+ PS C:\> $serviceTags.Values
37
+
38
+ Name : ApiManagement
39
+ System Service : AzureApiManagement
40
+ Address Prefixes : {13.64.39.16/32, 13.66.138.92/31, 13.66.140.176/28, 13.67.8.108/31...}
41
+ Change Number : 7
42
+
43
+ Name : ApiManagement.AustraliaCentral
44
+ System Service : AzureApiManagement
45
+ Region : australiacentral
46
+ Address Prefixes : {20.36.106.68/31, 20.36.107.176/28}
47
+ Change Number : 2
48
+
49
+ Name : ApiManagement.AustraliaCentral2
50
+ System Service : AzureApiManagement
51
+ Region : australiacentral2
52
+ Address Prefixes : {20.36.114.20/31, 20.36.115.128/28}
53
+ Change Number : 2
54
+
55
+ Name : ApiManagement.AustraliaEast
56
+ System Service : AzureApiManagement
57
+ Region : australiaeast
58
+ Address Prefixes : {13.70.72.28/31, 13.70.72.240/28, 13.75.217.184/32, 13.75.221.78/32...}
59
+ Change Number : 3
60
+
61
+ Name : ApiManagement.AustraliaSoutheast
62
+ System Service : AzureApiManagement
63
+ Region : australiasoutheast
64
+ Address Prefixes : {13.77.50.68/31, 13.77.52.224/28}
65
+ Change Number : 2
66
+
67
+ ...
68
+ ```
69
+
70
+ The command gets the list of service tag information resources and stores it in variable ` serviceTags ` .
71
+
72
+ ### Example 2: Get all address prefixes for AzureSQL
73
+ ``` powershell
74
+ PS C:\> $serviceTags = Get-AzNetworkServiceTag -Location eastus2
75
+ PS C:\> $sql = $serviceTags.Values | Where-Object { $_.Name -eq "Sql" }
76
+ PS C:\> $sql
77
+
78
+ Name : Sql
79
+ System Service : AzureSQL
80
+ Address Prefixes : {13.65.31.249/32, 13.65.39.207/32, 13.65.85.183/32, 13.65.200.105/32...}
81
+ Change Number : 18
82
+
83
+ PS C:\> $sql.Properties.AddressPrefixes.Count
84
+ 644
85
+ PS C:\> $sql.Properties.AddressPrefixes
86
+ 13.65.31.249/32
87
+ 13.65.39.207/32
88
+ 13.65.85.183/32
89
+ 13.65.200.105/32
90
+ 13.65.209.243/32
91
+ ...
92
+ ```
93
+
94
+ The first command gets the list of service tag information resources and stores it in variable ` serviceTags ` .
95
+ The second command filters the list to select information resource for Sql.
96
+
97
+ ### Example 3: Get Storage's service tag information resource for West US 2
98
+ ``` powershell
99
+ PS C:\> $serviceTags = Get-AzNetworkServiceTag -Location eastus2
100
+ PS C:\> $serviceTags.Values | Where-Object { $_.Name -eq "Storage.WestUS2" }
101
+
102
+ Name : Storage.WestUS2
103
+ System Service : AzureStorage
104
+ Region : westus2
105
+ Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
106
+ Change Number : 5
107
+
108
+ PS C:\> $serviceTags.Values | Where-Object { $_.Name -like "Storage*" -and $_.Properties.Region -eq "westus2" }
109
+
110
+ Name : Storage.WestUS2
111
+ System Service : AzureStorage
112
+ Region : westus2
113
+ Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
114
+ Change Number : 5
115
+
116
+ PS C:\> $serviceTags.Values | Where-Object { $_.Properties.SystemService -eq "AzureStorage" -and $_.Properties.Region -eq "westus2" }
117
+
118
+ Name : Storage.WestUS2
119
+ System Service : AzureStorage
120
+ Region : westus2
121
+ Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
122
+ Change Number : 5
123
+ ```
124
+
125
+ The first command gets the list of service tag information resources and stores it in variable ` serviceTags ` .
126
+ The following commands show various way to filter the list to select service tag information for Storage in West US 2.
127
+
128
+ ### Example 4: Get all global service tag information resources
129
+ ``` powershell
130
+ PS C:\> $serviceTags = Get-AzNetworkServiceTag -Location eastus2
131
+ PS C:\> $serviceTags.Values | Where-Object { -not $_.Properties.Region }
132
+
133
+
134
+ Name : ApiManagement
135
+ System Service : AzureApiManagement
136
+ Address Prefixes : {13.64.39.16/32, 13.66.138.92/31, 13.66.140.176/28, 13.67.8.108/31...}
137
+ Change Number : 7
138
+
139
+ Name : AppService
140
+ System Service : AzureAppService
141
+ Address Prefixes : {13.64.73.110/32, 13.65.30.245/32, 13.65.37.122/32, 13.65.39.165/32...}
142
+ Change Number : 13
143
+
144
+ Name : AppServiceManagement
145
+ System Service : AzureAppServiceManagement
146
+ Address Prefixes : {13.64.115.203/32, 13.66.140.0/26, 13.67.8.128/26, 13.69.64.128/26...}
147
+ Change Number : 7
148
+
149
+ Name : AzureActiveDirectory
150
+ System Service : AzureAD
151
+ Address Prefixes : {13.64.151.161/32, 13.66.141.64/27, 13.67.9.224/27, 13.67.50.224/29...}
152
+ Change Number : 3
153
+
154
+ Name : AzureActiveDirectoryDomainServices
155
+ System Service : AzureIdentity
156
+ Address Prefixes : {13.64.151.161/32, 13.66.141.64/27, 13.67.9.224/27, 13.69.66.160/27...}
157
+ Change Number : 2
158
+
159
+ ...
34
160
```
35
161
36
- The command gets the list of service tag information resources.
162
+ The first command gets the list of service tag information resources and stores it in variable ` serviceTags ` .
163
+ The second command filters the list to select only those without set region.
37
164
38
165
## PARAMETERS
39
166
0 commit comments