-
Notifications
You must be signed in to change notification settings - Fork 34
xDhcpServerReservation
dscbot edited this page Jan 20, 2025
·
4 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
ScopeID | Key | String | ScopeId for which reservations are set | |
IPAddress | Key | String | IP address of the reservation for which the properties are modified | |
ClientMACAddress | Required | String | Client MAC Address to set on the reservation | |
Name | Write | String | Reservation name | |
AddressFamily | Write | String | Address family type | IPv4 |
Ensure | Write | String | Whether option should be set or removed |
Present , Absent
|
The xDhcpServerReservation DSC resource manages lease assignments to reserv an IP address for a specific client on a subnet.
- Target machine must be running Windows Server 2012 R2 or later.
- Target machine must be running at minimum Windows PowerShell 5.0.
This example reservs an IP address within a DHCP server.
configuration Example
{
Import-DscResource -ModuleName 'PSDscResources' -ModuleVersion '2.12.0.0'
Import-DscResource -moduleName 'DhcpServerDsc'
WindowsFeature 'DHCP'
{
Name = 'DHCP'
Ensure = 'Present'
}
xDhcpServerReservation 'PullServerIP'
{
Ensure = 'Present'
ScopeID = '192.168.1.0'
ClientMACAddress = '00155D8A54A1'
IPAddress = '192.168.1.2'
Name = 'DSCPullServer'
AddressFamily = 'IPv4'
}
}