PowerShell Logo Small

Remove-NetIPAddress



This is the built-in help made by Microsoft for the command 'Remove-NetIPAddress', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Removes an IP address and its configuration.

SYNTAX


Remove-NetIPAddress [[-IPAddress] <String[]>] [-AddressFamily <AddressFamily[]>] [-AddressState <AddressState[]>] [-AsJob] [-CimSession <CimSession[]>] [-DefaultGateway
<String>] [-IncludeAllCompartments] [-InterfaceAlias <String[]>] [-InterfaceIndex <UInt32[]>] [-PassThru] [-PolicyStore <String>] [-PreferredLifetime <TimeSpan[]>]
[-PrefixLength <Byte[]>] [-PrefixOrigin <PrefixOrigin[]>] [-SkipAsSource <Boolean[]>] [-SuffixOrigin <SuffixOrigin[]>] [-ThrottleLimit <Int32>] [-Type <Type[]>]
[-ValidLifetime <TimeSpan[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-NetIPAddress [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-NetIPAddress cmdlet removes an IP address and its configuration. To remove a specific IP address object, use the IPv4 Address parameter or IPv6 Address parameter.
If you do not specify an IPv4 or IPv6 address, the cmdlet will remove all IP addresses that match.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288398
Get-NetIPAddress
New-NetIPAddress
Set-NetIPAddress

REMARKS

<

Examples


Example 1: Remove an IP address

PS C:\>New-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1


This command removes the IP address created by the previous command.
PS C:\>Remove-NetIPAddress –IPAddress 192.168.0.1



This command adds a new IP address.




Example 2: Remove an IP address using a pipeline

PS C:\>Get-NetIPAddress –IPAddress 192.168.0.1 | Remove-NetIPAddress



This command removes all of the IP addresses with the address 192.168.0.1.




Example 3: Remove IP addresses by prefix origin

PS C:\>Remove-NetIPAddress –PrefixOrigin Manual



This command removes all of the IP addresses that have a manually-configured prefix origin.