Remove-AzNetworkInterfaceIpConfig
Removes a network interface IP configuration from a network interface.
Syntax
Default (Default)
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.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Name
Specifies the name of the network interface IP configuration to remove.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-NetworkInterface
Specifies a NetworkInterface object. This object contains the network interface IP configuration to remove.
Parameter properties
| Type: | PSNetworkInterface |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
PSNetworkInterface
Outputs
PSNetworkInterface
Notes
- Keywords: azure, azurerm, arm, resource, management, manager, network, networking