DhcpScopes manages DHCP IP address scopes including exclusion ranges, option values, and reservations.
Use this resource when you need to create and manage DHCP scopes that define the IP address ranges available for dynamic allocation. It provides a comprehensive scope configuration including IP exclusion ranges, scope-level options, server-level options, and IP reservations for specific devices. For a full DHCP server setup from scratch, consider using DhcpServer instead.
An IP-address scope is a consecutive range of possible IP addresses that the DHCP server can lease to clients on a subnet.
Source |
|
DSC Resource |
|
Documentation |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Hashtable[] |
Set of IP address scopes. |
|||
DomainCredential |
PSCredential |
Credentials to authorizes a DHCP in Active Directory. This resource must run on an Active Directory domain controller. |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
ScopeId |
Key |
String |
Scope Identifier of the DHCP scope |
|
Name |
String |
Name of this DHCP Scope |
||
SubnetMask |
String |
Subnet mask for the scope specified in IP address format |
||
IPStartRange |
String |
Starting address to set for this scope |
||
IPEndRange |
String |
Ending address to set for this scope |
||
Description |
String |
Description of DHCP Scope |
||
LeaseDuration |
String |
Time interval for which an IP address should be leased. This should be specified in the following format: |
||
State |
String |
Whether scope should be active or inactive |
|
|
AddressFamily |
String |
Address family type |
|
|
Ensure |
String |
Whether DHCP scope should be present or removed |
|
DhcpScopes:
Scopes:
- ScopeId: 192.169.1.0
IPStartRange: 192.169.1.1
IPEndRange: 192.169.1.254
Name: Client1
SubnetMask: 255.255.255.0
LeaseDuration: 08:00:00
State: Active
AddressFamily: IPv4
- ScopeId: 192.169.2.0
IPStartRange: 192.169.2.1
IPEndRange: 192.169.2.254
Name: Client2
SubnetMask: 255.255.255.0
LeaseDuration: 08:00:00
State: Active
AddressFamily: IPv4
DomainCredential: '[ENC=PE9ianMgVmVy...=]'