Remove-IpamAddress

Remove-IpamAddress

Removes a set of addresses from IPAM.

Syntax

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>]

Detaillierte Beschreibung

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.

Parameter

-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.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-AsJob

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-CimSession<CimSession[]>

Führt das Cmdlet in einer Remotesitzung oder auf einem Remotecomputer aus. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, z. B. die Ausgabe eines Cmdlets New-CimSession oder Get-CimSession. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.

Aliasse

Session

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Force

Erzwingt, dass der Befehl ohne Benutzerbestätigung ausgeführt wird.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-InputObject<CimInstance[]>

Gibt die Eingabe für dieses Cmdlet an. Sie können diesen Parameter verwenden oder die Eingabe über die Pipeline an dieses Cmdlet übergeben.

Aliasse

Keiner

Erforderlich?

true

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByValue)

Platzhalterzeichen akzeptieren?

false

-IpAddress<IPAddress[]>

Specifies an array of IP addresses.

Aliasse

Keiner

Erforderlich?

true

Position?

2

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

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.

Aliasse

MB

Erforderlich?

false

Position?

3

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-NetworkType<VirtualizationType[]>

Specifies the network type of the address. Die folgenden Werte für diesen Parameter sind zulässig:

-- 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.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-PassThru

Gibt ein Objekt zurück, das das Element darstellt, mit dem Sie arbeiten. Standardmäßig wird von diesem Cmdlet keine Ausgabe generiert.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

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.

Aliasse

SI

Erforderlich?

false

Position?

4

Standardwert

Keiner

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-ThrottleLimit<Int32>

Gibt die maximale Anzahl von gleichzeitigen Vorgängen an, die zum Ausführen dieses Cmdlets eingerichtet werden können. Wenn dieser Parameter ausgelassen oder der Wert 0 eingegeben wird, berechnet Windows PowerShell® einen optimalen Drosselungsgrenzwert für das Cmdlet basierend auf der Anzahl der CIM-Cmdlets, die auf dem Computer ausgeführt werden. Die Drosselungsgrenze gilt nur für das aktuelle Cmdlet und nicht für die Sitzung oder den Computer.

Aliasse

Keiner

Erforderlich?

false

Position?

named

Standardwert

Keiner

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Confirm

Sie werden vor dem Ausführen des Cmdlets zur Bestätigung aufgefordert.

Erforderlich?

false

Position?

named

Standardwert

falsch

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-WhatIf

Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.

Erforderlich?

false

Position?

named

Standardwert

falsch

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • IpamAddress

    Represents an IP address on the IPAM server.

Beispiele

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

Verwandte Themen

Get-IpamAddress

Add-IpamAddress

Set-IpamAddress

Import-IpamAddress

Export-IpamAddress

Get-IpamAddressSpace