Get-AzureRmNetworkInterface

Gets a network interface.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

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

-ExpandResource

Type:String
Position:Named
Default value:None
Required:True
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
Required:True
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
Required:True
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
Required:True
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

PSNetworkInterface