Get-AzureRmNetworkInterface

Gets a network interface.

Caution

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

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

Description

The Get-AzureRmNetworkInterface cmdlet gets an Azure network interface or a list of Azure network interfaces in a resource group.

Examples

Example 1: Get all network interfaces

PS C:\>Get-AzureRmNetworkInterface

This command gets all network interfaces for the current subscription.

Example 2: Get all network interfaces with a specific provisioning state

PS C:\>Get-AzureRmNetworkInterface -ResourceGroupName "ResourceGroup1" | Where-Object {$_.ProvisioningState -eq 'Succeeded'}

This command gets all network interfaces in the resource group named ResourceGroup1 that has a provisioning state of succeeded.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

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

-ExpandResource

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

-Name

Specifies the name of the network interface that this cmdlet gets.

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

-ResourceGroupName

Specifies the name of the resource group from which this cmdlet gets network interfaces.

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

-VirtualMachineIndex

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
Accept pipeline input:True
Accept wildcard characters:False

-VirtualMachineScaleSetName

Specifies the name of the virtual machine scale set from which this cmdlet gets network interfaces.

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

Inputs

String

Outputs

PSNetworkInterface