Get-AzNetworkInterface
Gets a network interface.
Get-AzNetworkInterface
[-Name <String>]
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkInterface
[-Name <String>]
-ResourceGroupName <String>
[-VirtualMachineScaleSetName <String>]
[-VirtualMachineIndex <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkInterface
-Name <String>
-ResourceGroupName <String>
-VirtualMachineScaleSetName <String>
-VirtualMachineIndex <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkInterface
-ResourceId <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkInterface
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
The Get-AzNetworkInterface cmdlet gets an Azure network interface or a list of Azure network interfaces in a resource group.
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 :
This command gets all network interfaces for the current subscription.
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 :
This command gets all network interfaces in the resource group named ResourceGroup1 that has a provisioning state of succeeded.
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 :
This command gets all network interfaces for the current subscription that start with "test".
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the network interface that this cmdlet gets.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Specifies the name of the resource group from which this cmdlet gets network interfaces.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
The Azure resource manager id of the network interface.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the virtual machine index of the virtual machine scale set from which this cmdlet gets network interfaces.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the virtual machine scale set from which this cmdlet gets network interfaces.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: