Aracılığıyla paylaş


Get-AzNetworkInterface

Bir ağ arabirimi alır.

Syntax

NoExpandStandAloneNic (Varsayılan)

Get-AzNetworkInterface
    [-Name <String>]
    [-ResourceGroupName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ExpandStandAloneNic

Get-AzNetworkInterface
    -Name <String>
    -ResourceGroupName <String>
    -ExpandResource <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

NoExpandScaleSetNic

Get-AzNetworkInterface
    -ResourceGroupName <String>
    [-Name <String>]
    [-VirtualMachineScaleSetName <String>]
    [-VirtualMachineIndex <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ExpandScaleSetNic

Get-AzNetworkInterface
    -Name <String>
    -ResourceGroupName <String>
    -VirtualMachineScaleSetName <String>
    -VirtualMachineIndex <String>
    -ExpandResource <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByResourceIdExpandParameterSet

Get-AzNetworkInterface
    -ResourceId <String>
    -ExpandResource <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByResourceIdNoExpandParameterSet

Get-AzNetworkInterface
    -ResourceId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Get-AzNetworkInterface cmdlet'i bir Azure ağ arabirimi veya kaynak grubundaki Azure ağ arabirimlerinin listesini alır.

Örnekler

Örnek 1: Tüm ağ arabirimlerini alma

Get-AzNetworkInterface
Name                        : test1
ResourceGroupName           : ResourceGroup1
Location                    : eastus
Id                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/providers/Micros
                              oft.Network/networkInterfaces/test1
Etag                        : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid                : 00000000-0000-0000-0000-000000000000
ProvisioningState           : Succeeded
Tags                        :
VirtualMachine              : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Compute/virtualMachines/test1"
                              }
IpConfigurations            : [
                                {
                                  "Name": "test1",
                                  "Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
                                  "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provi
                              ders/Microsoft.Network/networkInterfaces/test1/ipConfigurations/test1",
                                  "PrivateIpAddress": "x.x.x.x",
                                  "PrivateIpAllocationMethod": "Dynamic",
                                  "Subnet": {
                                    "Delegations": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/virtualNetworks/test1/subnets/test1",
                                    "ServiceAssociationLinks": []
                                  },
                                  "PublicIpAddress": {
                                    "IpTags": [],
                                    "Zones": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/publicIPAddresses/test1"
                                  },
                                  "ProvisioningState": "Succeeded",
                                  "PrivateIpAddressVersion": "IPv4",
                                  "LoadBalancerBackendAddressPools": [],
                                  "LoadBalancerInboundNatRules": [],
                                  "Primary": true,
                                  "ApplicationGatewayBackendAddressPools": [],
                                  "ApplicationSecurityGroups": []
                                }
                              ]
DnsSettings                 : {
                                "DnsServers": [],
                                "AppliedDnsServers": []
                              }
EnableIPForwarding          : False
EnableAcceleratedNetworking : False
NetworkSecurityGroup        : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Network/networkSecurityGroups/test1"
                              }
Primary                     : True
MacAddress                  :

Bu komut geçerli abonelik için tüm ağ arabirimlerini alır.

Örnek 2: Belirli bir sağlama durumuna sahip tüm ağ arabirimlerini alma

Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" | Where-Object {$_.ProvisioningState -eq 'Succeeded'}
Name                        : test1
ResourceGroupName           : ResourceGroup1
Location                    : eastus
Id                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/providers/Micros
                              oft.Network/networkInterfaces/test1
Etag                        : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid                : 00000000-0000-0000-0000-000000000000
ProvisioningState           : Succeeded
Tags                        :
VirtualMachine              : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Compute/virtualMachines/test1"
                              }
IpConfigurations            : [
                                {
                                  "Name": "test1",
                                  "Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
                                  "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provi
                              ders/Microsoft.Network/networkInterfaces/test1/ipConfigurations/test1",
                                  "PrivateIpAddress": "x.x.x.x",
                                  "PrivateIpAllocationMethod": "Dynamic",
                                  "Subnet": {
                                    "Delegations": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/virtualNetworks/test1/subnets/test1",
                                    "ServiceAssociationLinks": []
                                  },
                                  "PublicIpAddress": {
                                    "IpTags": [],
                                    "Zones": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/publicIPAddresses/test1"
                                  },
                                  "ProvisioningState": "Succeeded",
                                  "PrivateIpAddressVersion": "IPv4",
                                  "LoadBalancerBackendAddressPools": [],
                                  "LoadBalancerInboundNatRules": [],
                                  "Primary": true,
                                  "ApplicationGatewayBackendAddressPools": [],
                                  "ApplicationSecurityGroups": []
                                }
                              ]
DnsSettings                 : {
                                "DnsServers": [],
                                "AppliedDnsServers": []
                              }
EnableIPForwarding          : False
EnableAcceleratedNetworking : False
NetworkSecurityGroup        : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Network/networkSecurityGroups/test1"
                              }
Primary                     : True
MacAddress                  :

Bu komut ResourceGroup1 adlı kaynak grubunda bulunan ve sağlama durumu başarılı olan tüm ağ arabirimlerini alır.

Örnek 3: Filtreleme kullanarak ağ arabirimlerini alma

Get-AzNetworkInterface -Name test*
Name                        : test1
ResourceGroupName           : ResourceGroup1
Location                    : eastus
Id                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/providers/Micros
                              oft.Network/networkInterfaces/test1
Etag                        : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid                : 00000000-0000-0000-0000-000000000000
ProvisioningState           : Succeeded
Tags                        :
VirtualMachine              : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Compute/virtualMachines/test1"
                              }
IpConfigurations            : [
                                {
                                  "Name": "test1",
                                  "Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
                                  "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provi
                              ders/Microsoft.Network/networkInterfaces/test1/ipConfigurations/test1",
                                  "PrivateIpAddress": "x.x.x.x",
                                  "PrivateIpAllocationMethod": "Dynamic",
                                  "Subnet": {
                                    "Delegations": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/virtualNetworks/test1/subnets/test1",
                                    "ServiceAssociationLinks": []
                                  },
                                  "PublicIpAddress": {
                                    "IpTags": [],
                                    "Zones": [],
                                    "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/pro
                              viders/Microsoft.Network/publicIPAddresses/test1"
                                  },
                                  "ProvisioningState": "Succeeded",
                                  "PrivateIpAddressVersion": "IPv4",
                                  "LoadBalancerBackendAddressPools": [],
                                  "LoadBalancerInboundNatRules": [],
                                  "Primary": true,
                                  "ApplicationGatewayBackendAddressPools": [],
                                  "ApplicationSecurityGroups": []
                                }
                              ]
DnsSettings                 : {
                                "DnsServers": [],
                                "AppliedDnsServers": []
                              }
EnableIPForwarding          : False
EnableAcceleratedNetworking : False
NetworkSecurityGroup        : {
                                "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup1/provide
                              rs/Microsoft.Network/networkSecurityGroups/test1"
                              }
Primary                     : True
MacAddress                  :

Bu komut, "test" ile başlayan geçerli abonelik için tüm ağ arabirimlerini alır.

Parametreler

-DefaultProfile

Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.

Parametre özellikleri

Tür:IAzureContextContainer
Default value:None
Joker karakterleri destekler:False
DontShow:False
Diğer adlar:AzContext, AzureRmContext, AzureCredential

Parametre kümeleri

(All)
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:False
Kalan bağımsız değişkenlerden elde edilen değer:False

-ExpandResource

Get-AzNetworkInterface cmdlet'i bir Azure ağ arabirimi veya kaynak grubundaki Azure ağ arabirimlerinin listesini alır.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:False
DontShow:False

Parametre kümeleri

ExpandStandAloneNic
Position:Named
Zorunlu:True
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False
ExpandScaleSetNic
Position:Named
Zorunlu:True
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False
GetByResourceIdExpandParameterSet
Position:Named
Zorunlu:True
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

-Name

Bu cmdlet'in aldığı ağ arabiriminin adını belirtir.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:True
DontShow:False

Parametre kümeleri

NoExpandStandAloneNic
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False
NoExpandScaleSetNic
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

-ResourceGroupName

Bu cmdlet'in ağ arabirimlerini aldığı kaynak grubunun adını belirtir.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:True
DontShow:False

Parametre kümeleri

NoExpandStandAloneNic
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

-ResourceId

Ağ arabiriminin Azure resource manager kimliği.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:False
DontShow:False

Parametre kümeleri

GetByResourceIdExpandParameterSet
Position:Named
Zorunlu:True
İşlem hattından gelen değer:True
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False
GetByResourceIdNoExpandParameterSet
Position:Named
Zorunlu:True
İşlem hattından gelen değer:True
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

-VirtualMachineIndex

Bu cmdlet'in ağ arabirimlerini aldığı sanal makine ölçek kümesinin sanal makine dizinini belirtir.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:False
DontShow:False

Parametre kümeleri

NoExpandScaleSetNic
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

-VirtualMachineScaleSetName

Bu cmdlet'in ağ arabirimlerini aldığı sanal makine ölçek kümesinin adını belirtir.

Parametre özellikleri

Tür:String
Default value:None
Joker karakterleri destekler:False
DontShow:False

Parametre kümeleri

NoExpandScaleSetNic
Position:Named
Zorunlu:False
İşlem hattından gelen değer:False
Özellik adına göre işlem hattından gelen değer:True
Kalan bağımsız değişkenlerden elde edilen değer:False

CommonParameters

Bu cmdlet yaygın parametreleri destekler: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction ve -WarningVariable. Daha fazla bilgi için bkz. about_CommonParameters.

Girişler

String

Çıkışlar

PSNetworkInterface