你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Remove-AzNetworkInterfaceIpConfig

Removes a network interface IP configuration from a network interface.

Syntax

Remove-AzNetworkInterfaceIpConfig
      -Name <String>
      -NetworkInterface <PSNetworkInterface>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

Description

The Remove-AzNetworkInterfaceIpConfig cmdlet removes a network interface IP configuration from an Azure network interface.

Examples

Example 1: Delete an IP configuration from a network interface

$nic = Get-AzNetworkInterface -Name mynic -ResourceGroupName myrg

Remove-AzNetworkInterfaceIpConfig -Name IPConfig-1 -NetworkInterface $nic

Set-AzNetworkInterface -NetworkInterface $nic

The first command gets a network interface called mynic and stores it in the variable $nic. The second command removes the IP configuration called IPConfig-1 associated with this network interface. The third command sets changes made to the network interface.

Parameters

-DefaultProfile

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

-Name

Specifies the name of the network interface IP configuration to remove.

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

-NetworkInterface

Specifies a NetworkInterface object. This object contains the network interface IP configuration to remove.

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

Inputs

PSNetworkInterface

Outputs

PSNetworkInterface

Notes

  • Keywords: azure, azurerm, arm, resource, management, manager, network, networking