Get-AzNetworkServiceTag

Ottiene l'elenco delle risorse di informazioni sui tag del servizio.

Sintassi

Get-AzNetworkServiceTag
   -Location <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Descrizione

Il cmdlet Get-AzNetworkServiceTag ottiene l'elenco delle risorse di informazioni sui tag del servizio.

Si noti che le informazioni sull'area di Azure specificate verranno usate come riferimento per la versione (non come filtro in base alla posizione). Ad esempio, anche se si specifica -Location eastus2 si otterrà l'elenco dei tag di servizio con i dettagli del prefisso in tutte le aree, ma limitato al cloud a cui appartiene la sottoscrizione (ad esempio Pubblico, Governo degli Stati Uniti, Cina o Germania).

Esempio

Esempio 1

$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$serviceTags

Name         : Public
Id           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/providers/Microsoft.Network/serviceTags/Public
Type         : Microsoft.Network/serviceTags
ChangeNumber : 63
Cloud        : Public
Values       : {ApiManagement, ApiManagement.AustraliaCentral, ApiManagement.AustraliaCentral2, ApiManagement.AustraliaEast...}

$serviceTags.Values

Name             : ApiManagement
System Service   : AzureApiManagement
Address Prefixes : {13.64.39.16/32, 13.66.138.92/31, 13.66.140.176/28, 13.67.8.108/31...}
Change Number    : 7

Name             : ApiManagement.AustraliaCentral
System Service   : AzureApiManagement
Region           : australiacentral
Address Prefixes : {20.36.106.68/31, 20.36.107.176/28}
Change Number    : 2

Name             : ApiManagement.AustraliaCentral2
System Service   : AzureApiManagement
Region           : australiacentral2
Address Prefixes : {20.36.114.20/31, 20.36.115.128/28}
Change Number    : 2

Name             : ApiManagement.AustraliaEast
System Service   : AzureApiManagement
Region           : australiaeast
Address Prefixes : {13.70.72.28/31, 13.70.72.240/28, 13.75.217.184/32, 13.75.221.78/32...}
Change Number    : 3

Name             : ApiManagement.AustraliaSoutheast
System Service   : AzureApiManagement
Region           : australiasoutheast
Address Prefixes : {13.77.50.68/31, 13.77.52.224/28}
Change Number    : 2

...

Il comando ottiene l'elenco delle risorse di informazioni sui tag del servizio e lo archivia nella variabile serviceTags.

Esempio 2: Ottenere tutti i prefissi di indirizzo per AzureSQL

$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$sql = $serviceTags.Values | Where-Object { $_.Name -eq "Sql" }
$sql

Name             : Sql
System Service   : AzureSQL
Address Prefixes : {13.65.31.249/32, 13.65.39.207/32, 13.65.85.183/32, 13.65.200.105/32...}
Change Number    : 18

$sql.Properties.AddressPrefixes.Count
644
$sql.Properties.AddressPrefixes
13.65.31.249/32
13.65.39.207/32
13.65.85.183/32
13.65.200.105/32
13.65.209.243/32
...

Il primo comando ottiene l'elenco delle risorse di informazioni sui tag di servizio e lo archivia nella variabile serviceTags. Il secondo comando filtra l'elenco per selezionare la risorsa informazioni per Sql.

Esempio 3: Ottenere la risorsa di informazioni sui tag di servizio di Archiviazione per Stati Uniti occidentali 2

$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$serviceTags.Values | Where-Object { $_.Name -eq "Storage.WestUS2" }

Name             : Storage.WestUS2
System Service   : AzureStorage
Region           : westus2
Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
Change Number    : 5

$serviceTags.Values | Where-Object { $_.Name -like "Storage*" -and $_.Properties.Region -eq "westus2" }

Name             : Storage.WestUS2
System Service   : AzureStorage
Region           : westus2
Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
Change Number    : 5

$serviceTags.Values | Where-Object { $_.Properties.SystemService -eq "AzureStorage" -and $_.Properties.Region -eq "westus2" }

Name             : Storage.WestUS2
System Service   : AzureStorage
Region           : westus2
Address Prefixes : {13.66.176.16/28, 13.66.176.48/28, 13.66.232.64/28, 13.66.232.208/28...}
Change Number    : 5

Il primo comando ottiene l'elenco delle risorse di informazioni sui tag di servizio e lo archivia nella variabile serviceTags. I comandi seguenti mostrano vari modi per filtrare l'elenco per selezionare le informazioni sui tag di servizio per Archiviazione negli Stati Uniti occidentali 2.

Esempio 4: Ottenere tutte le risorse di informazioni sui tag del servizio globale

$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$serviceTags.Values | Where-Object { -not $_.Properties.Region }

Name             : ApiManagement
System Service   : AzureApiManagement
Address Prefixes : {13.64.39.16/32, 13.66.138.92/31, 13.66.140.176/28, 13.67.8.108/31...}
Change Number    : 7

Name             : AppService
System Service   : AzureAppService
Address Prefixes : {13.64.73.110/32, 13.65.30.245/32, 13.65.37.122/32, 13.65.39.165/32...}
Change Number    : 13

Name             : AppServiceManagement
System Service   : AzureAppServiceManagement
Address Prefixes : {13.64.115.203/32, 13.66.140.0/26, 13.67.8.128/26, 13.69.64.128/26...}
Change Number    : 7

Name             : AzureActiveDirectory
System Service   : AzureAD
Address Prefixes : {13.64.151.161/32, 13.66.141.64/27, 13.67.9.224/27, 13.67.50.224/29...}
Change Number    : 3

Name             : AzureActiveDirectoryDomainServices
System Service   : AzureIdentity
Address Prefixes : {13.64.151.161/32, 13.66.141.64/27, 13.67.9.224/27, 13.69.66.160/27...}
Change Number    : 2

...

Il primo comando ottiene l'elenco delle risorse di informazioni sui tag di servizio e lo archivia nella variabile serviceTags. Il secondo comando filtra l'elenco per selezionare solo quelli senza impostare l'area.

Parametri

-DefaultProfile

Le credenziali, l’account, il tenant e la sottoscrizione usati per comunicare con Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Il percorso che verrà usato come riferimento per la versione (non come filtro in base alla posizione, si otterrà l'elenco dei tag di servizio con i dettagli del prefisso in tutte le aree, ma limitato al cloud a cui appartiene la sottoscrizione).

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Input

String

Output

PSNetworkServiceTag