Remove-IpamAddress

Remove-IpamAddress

Removes a set of addresses from IPAM.

Sintaxis

Parameter Set: ByAddress
Remove-IpamAddress [-IpAddress] <IPAddress[]> [[-ManagedByService] <String[]> ] [[-ServiceInstance] <String[]> ] [-AddressSpace <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-Force] [-NetworkType <VirtualizationType[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Remove-IpamAddress -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Remove-IpamAddress cmdlet removes a set of addresses from IP Address Management (IPAM). The cmdlet removes the specified IP address records permanently from the IPAM database. Specify the IP addresses to remove or use the InputObject parameter to specify an IpamAddress object to remove.

The cmdlet does not remove any reservations on the Dynamic Host Configuration Protocol (DHCP) server or Domain Name System (DNS) records. You can use Windows PowerShell for DHCP Server to remove a reservation from the DCHP server. You can use Windows PowerShell for DNS to remove the DNS records associated with the IP addresses that you remove.

Parámetros

-AddressSpace<String[]>

Specifies an array of address spaces. The cmdlet removes the addresses that belong to the address spaces that you specify. If you specify this parameter, you must specify the IpAddress parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Force

Fuerza que el comando se ejecute sin pedir confirmación al usuario.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-InputObject<CimInstance[]>

Especifica la entrada para este cmdlet. Puede usar este parámetro o puede canalizar la entrada a este cmdlet.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-IpAddress<IPAddress[]>

Specifies an array of IP addresses.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ManagedByService<String[]>

Specifies an array of services that manage the IP addresses that you specify in the IpAddress parameter. If you specify this parameter, you must specify the IpAddress parameter.

The values that you specify for this parameter must exist in the set of values that you defined for the ManagedByService custom field in IPAM.

Alias

MB

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NetworkType<VirtualizationType[]>

Specifies the network type of the address. Los valores aceptables para este parámetro son los siguientes:

-- Provider
-- Customer
-- NonVirtualized

The default value is NonVirtualized.

If you specify Default for the AddressSpace parameter, the valid values for this parameter are Provider and NonVirtualized. If you specify a provider type of address space for the AddressSpace parameter, you must specify Provider for this parameter. If you specify a customer type of address space for the AddressSpace parameter, you must specify Customer for this parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ServiceInstance<String[]>

Specifies an array of instances of the services that manage the IP addresses. Specify the instances of the services that you specified for the ManagedByService parameter. If you specify this parameter, you must specify the IpAddress parameter. The value that you specify for this parameter must exist in the set of values that you defined for the ServiceInstance custom field in IPAM.

Alias

SI

¿Requerido?

false

¿Posición?

4

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • IpamAddress

    Represents an IP address on the IPAM server.

Ejemplos

Example 1: Remove all IP addresses in range

This example removes all IP addresses in a range.

The first command uses the Get-IpamRange cmdlet to get an IpamRange object that contains the addresses that belong to a range of IP addresses. The command stores the object in the $Range variable.

The second command uses the Get-IpamAddress cmdlet to get an IpamAddress object that contains the IP addresses that map to the range stored in the $Range variable. The command passes the IpamAddress object to the Remove-IpamAddress cmdlet by using the pipeline operator. The command removes the addresses in the range stored in the $Range variable.

PS C:\> $Range = Get-IpamRange -StartIPAddress 10.12.3.1 -EndIPAddress 10.12.3.254PS C:\>Get-IpamAddress -MappingToRange $Range | Remove-IpamAddress

Example 2: Remove all expired physical addresses managed by IPAM

This command gets an IpamAddress object that contains the physical addresses managed by IPAM that have expired. The command passes the IpamAddress object to the Remove-IpamAddress cmdlet by using the pipeline operator. The Remove-IpamAddress cmdlet removes the IpamAddress object.

PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -ManagedByService IPAM | Where-Object {$_.ExpiryStatus -eq "Expired"} | Remove-IpamAddress

Example 3: Remove a customer IP address

This command removes the customer IP address 172.16.10.16 from the default address space.

PS C:\> Remove-IpamAddress -IpAddress 172.16.10.16 -AddressSpace "Default"

Example 4: Remove a provider IP address

This command removes the provider IP address 172.16.10.19 from the default address space.

PS C:\> Remove-IpamAddress -IpAddress 172.16.10.19 -AddressSpace "Default" -NetworkType Provider

Temas relacionados

Get-IpamAddress

Add-IpamAddress

Set-IpamAddress

Import-IpamAddress

Export-IpamAddress

Get-IpamAddressSpace