Skip to content

Latest commit

 

History

History
415 lines (327 loc) · 10.9 KB

Add-DhcpServerv4Scope.md

File metadata and controls

415 lines (327 loc) · 10.9 KB
external help file Module Name ms.date online version schema title
PS_DhcpServerV4Scope_v1.0.0.cdxml-help.xml
DhcpServer
10/30/2017
2.0.0
Add-DhcpServerv4Scope

Add-DhcpServerv4Scope

SYNOPSIS

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

SYNTAX

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

DESCRIPTION

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

EXAMPLES

EXAMPLE 1

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

This example adds a new scope for 10.10.10.0/24 subnet on the DHCP server service running on the local computer.

EXAMPLE 2

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

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.

EXAMPLE 3

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"

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.

PARAMETERS

-ActivatePolicies

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

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AsJob

ps_cimcommon_asjob

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.

Type: CimSession[]
Parameter Sets: (All)
Aliases: Session

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputerName

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

Type: String
Parameter Sets: (All)
Aliases: Cn

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Delay

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.

Type: UInt16
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Description

Specifies the description string for the IPv4 scope being added.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EndRange

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

Type: IPAddress
Parameter Sets: (All)
Aliases: 

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LeaseDuration

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.

Type: TimeSpan
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 8.00:00:00
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxBootpClients

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.

Type: UInt32
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name

Specifies the name of the IPv4 scope being added.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: 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.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NapProfile

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.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartRange

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

Type: IPAddress
Parameter Sets: (All)
Aliases: 

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State

Specifies the state of the scope when created. The acceptable values for this parameter are: Active or Inactive. Only an active scope will respond to client requests. The default value is Active.

Type: String
Parameter Sets: (All)
Aliases: 
Accepted values: Active, InActive

Required: False
Position: Named
Default value: Active
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetMask

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

Type: IPAddress
Parameter Sets: (All)
Aliases: 

Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SuperscopeName

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

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type: Int32
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type

Specifies the type of clients to be serviced by the scope. The acceptable values for this parameter are: 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.

Type: String
Parameter Sets: (All)
Aliases: 
Accepted values: Dhcp, Bootp, Both

Required: False
Position: Named
Default value: DHCP
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/DHCP/DhcpServerv4Scope

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

OUTPUTS

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/DHCP/DhcpServerv4Scope

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

NOTES

RELATED LINKS

Get-DhcpServerv4Scope

Get-DhcpServerv4ScopeStatistics

Remove-DhcpServerv4Scope

Set-DhcpServerv4Scope