Add-DhcpServerv4Scope

Add-DhcpServerv4Scope

Adds an IPv4 scope on the Dynamic Host Configuration Protocol (DHCP) server service.

Sintaxis

Parameter Set: Add0
Add-DhcpServerv4Scope [-StartRange] <IPAddress> [-EndRange] <IPAddress> [-SubnetMask] <IPAddress> [-Name] <String> [-ActivatePolicies <Boolean> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-Delay <UInt16> ] [-Description <String> ] [-LeaseDuration <TimeSpan> ] [-MaxBootpClients <UInt32> ] [-NapEnable] [-NapProfile <String> ] [-PassThru] [-State <String> ] [-SuperscopeName <String> ] [-ThrottleLimit <Int32> ] [-Type <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Add-DhcpServerv4Scope cmdlet adds an IPv4 scope on the Dynamic Host Configuration Protocol (DHCP) server service with the specified parameters.

Parámetros

-ActivatePolicies<Boolean>

Specifies the enabled state of the policy enforcement on the scope being added.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

True

¿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

-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

-Delay<UInt16>

Specifies the number of milliseconds by which the DHCP server service should wait before responding to the client requests. This parameter should be configured if the scope is part of a split scope deployment and this DHCP server service should act as a secondary DHCP server service for the scope being added.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

0

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies the description string for the IPv4 scope being added.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-EndRange<IPAddress>

Specifies the ending IP address of the range within the subnet from which IP addresses should be leased by the DHCP server service.

Alias

ninguno

¿Requerido?

true

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-LeaseDuration<TimeSpan>

Specifies the time interval for which an IP address should be leased to a client in this scope. This should be specified in the format day.hrs:mins:secs.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

8.00:00:00

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-MaxBootpClients<UInt32>

Specifies, if the scope type is specified as Both to allow for both DHCP and BootP clients, the maximum number of BootP clients which should be leased an IP address from this scope.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies the name of the IPv4 scope being added.

Alias

ninguno

¿Requerido?

true

¿Posición?

5

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NapEnable

Specifies the enabled state of Network Access Protection (NAP) for this scope. If NAP is enabled, then the DHCP server service passes the statement of health (SoH) received from the client to the network policy server (NPS). Based on the NAP profile set, the NPS determines the network access to be granted to the client.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NapProfile<String>

Specifies that the NAP profile should be set only if NAP is enabled on the scope. The NAP profile refers to the MS Service Class which is a condition used in network policies on NPS.

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

-StartRange<IPAddress>

Specifies the starting IP address of the range within the subnet from which IP addresses should be leased by the DHCP server service.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-State<String>

Specifies the state of the scope when created. Los valores aceptables para este parámetro son los siguientes: Active or Inactive. Only an active scope will respond to client requests. The default value is Active.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

Active

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SubnetMask<IPAddress>

Specifies the subnet mask for the scope specified in IP address format. For example: 255.255.255.0.

Alias

ninguno

¿Requerido?

true

¿Posición?

4

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SuperscopeName<String>

Specifies the name of the superscope to which the scope will be added.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

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

-Type<String>

Specifies the type of clients to be serviced by the scope. Los valores aceptables para este parámetro son los siguientes: DHCP, BootP, or Both. The type of the scope determines if the DHCP server service responds to only DHCP client requests, only BootP client requests, or Both types of clients.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

DHCP

¿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 adds a new scope for 10.10.10.0/24 subnet on the DHCP server service running on the local computer.

PS C:\> Add-DhcpServerv4Scope -Name "Lab-4 Network" -StartRange 10.10.10.1 -EndRange 10.10.10.254 -SubnetMask 255.255.255.0

EXAMPLE 2

This example adds the specified inactive scope for 20.20.20.0/24 subnet on the DHCP server service. The scope is enabled for NAP.

PS C:\> Add-DhcpServerv4Scope -ComputerName dhcpserver.contoso.com -Name "Lab-5 Network" -StartRange 20.20.20.1 -EndRange 20.20.20.254 -SubnetMask 255.255.255.0 -State InActive -NapEnable

EXAMPLE 3

This example adds a new scope for 30.30.30.0/24 subnet on the DHCP server service running on the local computer. The scope is added as part of the superscope named Expanded Lab-6 Network.

PS C:\> Add-DhcpServerv4Scope -Name "Lab-6 Network" -StartRange 30.30.30.1 -EndRange 30.30.30.254 -SubnetMask 255.255.255.0 -SuperScope "Expanded Lab-6 Network"

Temas relacionados

Get-DhcpServerv4Scope

Get-DhcpServerv4ScopeStatistics

Remove-DhcpServerv4Scope

Set-DhcpServerv4Scope