Add-IpamAddress

Add-IpamAddress

Adds an IP address to IPAM.

Sintaxis

Parameter Set: AddAddress0
Add-IpamAddress [-IpAddress] <IPAddress> [[-ManagedByService] <String> ] [[-ServiceInstance] <String> ] [-AddressSpace <String> ] [-AsJob] [-AssetTag <String> ] [-AssignmentDate <DateTime> ] [-AssignmentType <AddressAssignment> ] [-CimSession <CimSession[]> ] [-ClientId <String> ] [-CustomConfiguration <String> ] [-Description <String> ] [-DeviceName <String> ] [-DeviceType <String> ] [-Duid <String> ] [-ExpiryDate <DateTime> ] [-ForwardLookupPrimaryServer <String> ] [-ForwardLookupZone <String> ] [-Iaid <UInt32> ] [-IpAddressState <String> ] [-MacAddress <String> ] [-NetworkType <VirtualizationType> ] [-Owner <String> ] [-PassThru] [-ReservationDescription <String> ] [-ReservationName <String> ] [-ReservationServer <String> ] [-ReservationType <DhcpReservationType> ] [-ReverseLookupPrimaryServer <String> ] [-ReverseLookupZone <String> ] [-SerialNumber <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Add-IpamAddress cmdlet adds an IP address to IP Address Management (IPAM). You can use the cmdlet to associate the Dynamic Host Configuration Protocol (DHCP) reservation properties with the IP address. The cmdlet does not create a reservation on the DHCP server. You can use Windows PowerShell for DHCP Server to create a reservation on the DHCP server.

Parámetros

-AddressSpace<String>

Specifies the address space that is associated with the IP address. The default value is Default.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

Default

¿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

-AssetTag<String>

Specifies the asset tag associated with the IP address.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-AssignmentDate<DateTime>

Specifies the date on which you assigned the IP address to a device. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-AssignmentType<AddressAssignment>

Specifies how IPAM assigns this address. Los valores aceptables para este parámetro son los siguientes:

-- Static
-- Dynamic
-- Auto
-- VIP
-- Reserved

The default value is Static.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

Static

¿Aceptar canalización?

True (ByPropertyName)

¿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

-ClientId<String>

Specifies the ID of the client.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-CustomConfiguration<String>

Specifies semicolon-separated name/value pairs. This parameter specifies custom metadata that is associated with the address.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies a description of the IP address assignment for a device.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DeviceName<String>

Specifies the name of the device to which you assigned the address.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DeviceType<String>

Specifies the type of device to which you assigned the address. Specify a value that exists in the built-in DeviceType custom field. Los valores aceptables para este parámetro son los siguientes:

-- VM
-- Host

The default value is Host.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

Host

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Duid<String>

Specifies the DHCP device unique identifier (DUID) for the client. Clients use the DUID to get an IP address from a DHCPv6 server.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ExpiryDate<DateTime>

Specifies an expiry date for the address. IPAM alerts the administrator when the IP address expires. IPAM does not reclaim expired addresses automatically.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ForwardLookupPrimaryServer<String>

Specifies the name of the DNS server that IPAM uses to resolve host names to IP addresses.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ForwardLookupZone<String>

Specifies the name of the forward lookup zone that contains a mapping of host names to IP addresses.

Alias

FwdLookupZone

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Iaid<UInt32>

Specifies the identity association ID (IAID) of an IPv6 address.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-IpAddress<IPAddress>

Specifies an IP address. The cmdlet adds the IP address to IPAM.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-IpAddressState<String>

Specifies the usage state of the IP address. By default, the cmdlet sets the address as In-Use. You can specify a valid custom value for this parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

In-Use

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-MacAddress<String>

Specifies the media access control (MAC) address of the device to which the address is assigned.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ManagedByService<String>

Specifies the name of the service that manages the IP address. The value that you specify for this parameter must exist in the set of values that you defined for the ManagedByService custom field in IPAM.

You can use the Add-IpamCustomValue cmdlet to add a value to the ManagedByService custom field in IPAM. You can use the Remove-IpamCustomValue cmdlet to remove a value from the ManagedByService custom field in IPAM.

Alias

MB

¿Requerido?

false

¿Posición?

3

Valor predeterminado

IPAM

¿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

NonVirtualized

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Owner<String>

Specifies the name of the owner of the address.

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

-ReservationDescription<String>

Specifies a description for the DHCP reservation.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReservationName<String>

Specifies the name of the reservation on the DHCP server for the device. You must specify a value for this parameter if you specify the ReservationServer parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReservationServer<String>

Specifies the DHCP server on which the reservation is assigned. The cmdlet stores the reservation data in IPAM. The cmdlet does not create a reservation on the DHCP server.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReservationType<DhcpReservationType>

Specifies the protocols that the reservation supports. You must specify a value for this parameter if you specify the ReservationServer parameter. Los valores aceptables para este parámetro son los siguientes:

-- DHCP
-- BootPr
-- DHCP and BootPr

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReverseLookupPrimaryServer<String>

Specifies the DNS server that IPAM uses to resolve IP addresses to host names.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReverseLookupZone<String>

Specifies the reverse lookup zone that contains the mapping from IP addresses to fully qualified domain names (FQDNs).

Alias

RevLookupZone

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SerialNumber<String>

Specifies the serial number of the device that is associated with the IP address.

Alias

SN

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ServiceInstance<String>

Specifies the instance of the service that manages the IP address. Specify the instance of the service that you specified for the ManagedByService 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

Localhost

¿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: Add a physical IP address to the IPAM server

This command adds the physical IP address 10.12.3.5 to the default address space that the current instance of the IPAM server manages. The command uses the following default values for the address:

-- ManagedByService parameter uses the default value IPAM
-- ServiceInstance parameter uses the default value Localhost
-- DeviceType parameter uses the default value Host
-- AssignmentType parameter uses the default value Static

PS C:\> Add-IpamAddress -IpAddress 10.12.3.5 -PassThru

Example 2: Assign a dynamic IP address to a virtual machine

This command assigns the IP address 10.12.4.8 to a virtual machine. The command specifies that the DHCP server named dhcp1.contoso.com manages the address. The command specifies that the address expires in two weeks, at which time you can reclaim it.

PS C:\> Add-IpamAddress -IpAddress 10.12.4.9 -ManagedByService "TSQA DHCP" -ServiceInstance "dhcp1.contoso.com" -AssignmentType Dynamic -DeviceType VM -ExpiryDate $TwoWeeksFromNow -PassThru

Example 3: Add a provider IP address to the IPAM server

This command adds the provider IP address 172.16.10.16 (which the current instance of IPAM manages) to the default address space.

PS C:\> Add-IpamAddress -NetworkType Provider -IpAddress 172.16.10.16 -PassThru

Example 4: Add a provider IP address that Virtual Machine Manager manages

This command adds a provider IP address that is managed by and belongs to the provider address space named Datacenter01. statically manages the address assignment. Because this address is in a different address space, IPAM does not mark it as a duplicate.

PS C:\> Add-IpamAddress -IpAddress 172.16.10.16 -AddressSpace "Datacenter01" -ManagedByService VMM -ServiceInstance "vmm1.contoso.com" -PassThru

Example 5: Add a customer IP address that a Virtual Machine Manager instance manages

This command adds a customer IP address that the instance vmm01.contoso.com manages. The address is added to the customer address space for the tenant named Datacenter01.

PS C:\> Add-IpamAddress -IpAddress 172.16.10.16 -Virtual -AddressSpace "Datacenter01" -ManagedByService VMM -ServiceInstance "vmm01.contoso.com" -DeviceType VM

Temas relacionados

Get-IpamAddress

Set-IpamAddress

Remove-IpamAddress

Import-IpamAddress

Export-IpamAddress

Get-IpamCustomField

Get-IpamAddressSpace