Add-DhcpServerv4Lease

Add-DhcpServerv4Lease

Adds a new IPv4 address lease in the Dynamic Host Configuration Protocol (DHCP) server service.

Sintaxis

Parameter Set: Add0
Add-DhcpServerv4Lease [-ScopeId] <IPAddress> [-IPAddress] <IPAddress> [-ClientId] <String> [-AddressState <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-ClientType <String> ] [-ComputerName <String> ] [-Description <String> ] [-DnsRegistration <String> ] [-DnsRR <String> ] [-HostName <String> ] [-LeaseExpiryTime <DateTime> ] [-NapCapable <Boolean> ] [-NapStatus <String> ] [-PassThru] [-PolicyName <String> ] [-ProbationEnds <DateTime> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Add-DhcpServerv4Lease cmdlet adds a new IPv4 address lease on the Dynamic Host Configuration Protocol (DHCP) server service. This cmdlet is only supported for DHCP server service running on Windows Server® 2012. This cmdlet is for testing purposes only.

Parámetros

-AddressState<String>

Specifies the state of the IPv4 Address lease. Los valores aceptables para este parámetro son los siguientes: Offered, Active, Declined, Expired, or Inactive. The default value is Active.

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

-ClientId<String>

Specifies the client identifier (ID) to be set on the IPv4 address lease. Windows clients use the MAC address as the client ID.

Alias

ninguno

¿Requerido?

true

¿Posición?

4

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ClientType<String>

Specifies the type of the client. Los valores aceptables para este parámetro son los siguientes: Unspecified, DHCP, BootP, Both, Reservation, or None.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ComputerName<String>

Specifies the DNS name, or IPv4 or IPv6 address, of the target computer running the DHCP server service.

Alias

Cn

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies the description string to be set on the IPv4 address lease.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DnsRegistration<String>

Indicates the status of the DNS registration of the lease.
Los valores aceptables para este parámetro son los siguientes:
- Complete: For an active lease, registration of the required records , as specified by the DnsRR parameter value of PTR or AandPTR, is complete.
     - - For an expired lease, deletion of the required records has been done.
- Pending: For an active lease, registration of the required records, as specified by the DnsRR parameter value of PTR or AandPTR, is pending.
     - - For an expired lease, deletion of the required records is pending.
- Not applicable: When the DnsRR parameter is set to NoRegistration such as when no dynamic DNS registration is to be performed by the DHCP server service, this parameter is set to Not applicable.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DnsRR<String>

Indicates the type of DNS record to be registered by the DHCP server service for this lease. Los valores aceptables para este parámetro son los siguientes:
- PTR: Only PTR record to be registered by the DHCP server service.
- AandPTR: Both A and PTR records to be registered by the DHCP server service.
- NoRegistration: No DNS registration is done by the DHCP server service. If the dynamic DNS is turned off on the DHCP server service, then this parameter is set to NoRegistration.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-HostName<String>

Specifies the DNS host name of the client for which the IP address lease is to be added.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-IPAddress<IPAddress>

Specifies the IPv4 Address for which the IPv4 address lease record is to be added on the DHCP server service.

Alias

ninguno

¿Requerido?

true

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LeaseExpiryTime<DateTime>

Specifies the expiry time of the IPv4 address lease.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NapCapable<Boolean>

Indicates that the client is network access protection (NAP) capable. Los valores aceptables para este parámetro son los siguientes: True or False.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NapStatus<String>

Specifies the NAP status of the client. Los valores aceptables para este parámetro son los siguientes: NoQuarantine, RestrictedAccess, DropPacket, Probation, Exempt, DefaultQuarSetting, or NoQuarInfo. The default value is NoQuarantine.

If this parameter is specified as Probation and a probation period is not specified, then this cmdlet will return an error.

If this parameter is not specified or is specified as something other than Probation and probation period is not specified, then the probation period to set to 0.

If this parameter is not specified and probation period is specified, then this parameter is set to Probation.

If this parameter is not specified or is specified as something other than Probation and the ProbationEnds parameter is specified, then this cmdlet will return an error.

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

-PolicyName<String>

Specifies the name of the policy to be set on the IPv4 address lease record being added.

Note: The DHCP server service does not check whether the policy specified exists on the server.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ProbationEnds<DateTime>

Specifies the end-time of probation to be set on the IPv4 address lease record.
The default value is 0.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ScopeId<IPAddress>

Specifies the subnet mask to be set on the IPv4 address lease record being added.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

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.

Ejemplos

EXAMPLE 1

This example adds an IPv4 address lease for the IPv4 address 10.10.10.11 on the DHCP server service running on the local computer.

PS C:\> Add-DhcpServerv4Lease -IPAddress 10.10.10.11 -ScopeId 10.10.10.0 -ClientId F0-DE-F1-7A-00-5E -LeaseExpiryTime "2012-01-28 01:38:13Z" -HostName MyComputer.contoso.com

Temas relacionados

Get-DhcpServerv4Lease

Remove-DhcpServerv4Lease