Set-DhcpServerv4DnsSetting

Set-DhcpServerv4DnsSetting

Configures how the Dynamic Host Configuration Protocol (DHCP) server service updates the DNS server with the client-related information.

Sintaxis

Parameter Set: Set1
Set-DhcpServerv4DnsSetting [[-ScopeId] <IPAddress> ] [[-IPAddress] <IPAddress> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-DeleteDnsRROnLeaseExpiry <Boolean> ] [-DisableDnsPtrRRUpdate <Boolean> ] [-DnsSuffix <String> ] [-DynamicUpdates <String> ] [-NameProtection <Boolean> ] [-PassThru] [-PolicyName <String> ] [-ThrottleLimit <Int32> ] [-UpdateDnsRRForOlderClients <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Set-DhcpServerv4DnsSetting cmdlet configures how the Dynamic Host Configuration Protocol (DHCP) server service updates the DNS server with the client-related information. This cmdlet modifies the effective DNS update setting and sets the setting on the server or the specified scope, policy or reservation.

Specify at least one parameter related to DNS update settings from the following parameters:

-- DeleteDnsRROnLeaseExpiry
-- DynamicUpdates
-- NameProtection
-- UpdateDnsRRForOlderClients
-- DnsSuffix
-- DisableDnsPtrRRUpdate

If you do not specify any of the ScopeId, IPAddress, or PolicyName parameters along with the parameters for DNS update settings, then the specified DNS update settings are set for the server level.

If you specify ScopeId, the DNS settings are set for the scope. If you specify PolicyName, the DNS settings are set for the server level policy. If you specify both ScopeId and PolicyName, the DNS settings are set for the scope level policy.

If you specify IPAddress, the DNS settings are set for the reservation. Do not specify IPAddress with ScopeID or PolicyName.

Parámetros

-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

-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

-DeleteDnsRROnLeaseExpiry<Boolean>

Specifies that the DHCP server service should delete the DNS resource records for the client after the lease expires.
Los valores aceptables para este parámetro son los siguientes: True or False. This parameter can only be set if the DynamicUpdate parameter is set to Always or OnClientRequest.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-DisableDnsPtrRRUpdate<Boolean>

Indicates whether the DHCP server performs the dynamic DNS registration of only A records. If this value is $True, the DHCP server performs registration for only A records. If this value is $False, the server performs registration of both A and PTR records.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-DnsSuffix<String>

Specifies a guest DNS suffix for registering DHCP clients with the DNS server. The string must contain at least one character and cannot exceed 256 characters. Do not specify this parameter unless you specify the PolicyName parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-DynamicUpdates<String>

Specifies the conditions under which to perform dynamic updates on the DNS server.
Los valores aceptables para este parámetro son los siguientes: Always, Never, or OnClientRequest.
- Always: The DHCP server service will always perform dynamic DNS registration of A and PTR records for the clients.
- Never: The DHCP server service will not perform any dynamic DNS registration
- OnClientRequest: The DHCP server service will perform dynamic DNS registration of A and PTR records if the client has requested the same in the DHCP client message.

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 of the reservation for which the specified DNS update settings are being set.

Alias

ReservedIP

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NameProtection<Boolean>

Specifies the enabled state for the DNS name protection on the DHCP server service.
If this parameter is set to True, then DNS name protection is enabled. If this parameter is set to True and there is an existing DNS record matching the name, then the DNS update for the client will fail instead of being overwritten.

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ScopeId<IPAddress>

Specifies the scope identifier, in IPv4 address format, for which the DNS update settings are being set.

Alias

ninguno

¿Requerido?

false

¿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

-UpdateDnsRRForOlderClients<Boolean>

Specifies the enabled state for the DNS registration of A and PTR records for older clients which do not request DNS updates.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿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 sets the server level, or server-wide, DNS update configuration settings to always update DNS with leases entries and deletes the client entry from DNS when the lease expires.

PS C:\> Set-DhcpServerv4DnsSetting -ComputerName dhcpserver.contoso.com -DynamicUpdates Always -DeleteDnsRRonLeaseExpiry True

EXAMPLE 2

This example sets the DNS update configuration settings for scope 10.10.10.0 to update the DNS with leases entries based on client request, indicated in the FQDN option (option ID 81), and enables name protection by creating dynamic host configuration identifier (DHCID) resource records.

PS C:\> Set-DhcpServerv4DnsSetting -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -DynamicUpdates OnClientRequest -NameProtection True

EXAMPLE 3

This example sets the DNS update configuration settings for the reserved IP address 10.10.10.5 to never update the DNS for client lease entries. This cmdlet clears all of the properties other than the property that is specified.

PS C:\> Set-DhcpServerv4DnsSetting -ComputerName dhcpserver.contoso.com -IPAddress 10.10.10.5 -DynamicUpdates Never

EXAMPLE 4

This example sets DNS update configuration settings for the sever policy WorkgroupDevices to disable DNS dynamic updates for PTR records. The command specifies the computer, named dhcpserver.contoso.com, that runs the DHCP server service.

PS C:\> Set-DhcpServerv4DnsSetting -ComputerName dhcpserver.contoso.com -DisableDnsPtrRRUpdates $True -PolicyName WorkgroupDevices

EXAMPLE 5

This example sets DNS update configuration settings for the sever policy ForeignDevices to enable DNS registration of clients under the DNS suffix guestdomain.com. The command specifies the computer, named dhcpserver.contoso.com, that runs the DHCP server service.

PS C:\> Set-DhcpServerv4DnsSetting -ComputerName dhcpserver.contoso.com -DnsSuffix guestdomain.com -PolicyName ForeignDevices

Temas relacionados

Get-DhcpServerv4DnsSetting