-
Notifications
You must be signed in to change notification settings - Fork 33
DhcpServerOptionValue
dscbot edited this page Aug 18, 2023
·
2 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
OptionId | Key | UInt32 | Option ID, specify an integer between 1 and 255. | |
Value | Write | StringArray[] | Option data value. Could be an array of string for a multivalued option. | |
VendorClass | Key | String | Vendor class. Use an empty string for default vendor class. | |
UserClass | Key | String | User class. Use an empty string for default user class. | |
AddressFamily | Key | String | Address family. Currently needs to be IPv4. | IPv4 |
Ensure | Write | String | Whether the DHCP option should exist. |
Present , Absent
|
The DhcpServerOptionValue DSC resource manages option values at server level.
- Target machine must be running Windows Server 2012 R2 or later.
- Target machine must be running at minimum Windows PowerShell 5.0.
This example sets an option ID 8 (cookie servers) on a server level.
configuration Example
{
Import-DscResource -ModuleName 'PSDscResources' -ModuleVersion '2.12.0.0'
Import-DscResource -moduleName 'xDhcpServer'
WindowsFeature 'DHCP'
{
Name = 'DHCP'
Ensure = 'Present'
}
DhcpServerOptionValue 'ServerOptionValue_ID-008'
{
OptionId = 8
Value = '1.1.1.1'
VendorClass = ''
UserClass = ''
AddressFamily = 'IPv4'
Ensure = 'Present'
}
}