-
Notifications
You must be signed in to change notification settings - Fork 34
xDhcpServerAuthorization
dscbot edited this page Jan 20, 2025
·
4 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
IsSingleInstance | Key | String | Specifies the resource is a single instance, the value must be 'Yes'. | Yes |
Ensure | Required | String | Whether the DHCP server should be authorized within Active Directory |
Present , Absent
|
DnsName | Write | String | DHCP Server FQDN | |
IPAddress | Write | String | DHCP Server IP Address |
The xDhcpServerAuthorization DSC resource manages the authorization of a DHCP server in Active Directory.
- Target machine must be running Windows Server 2012 R2 or later.
- Target machine must be running at minimum Windows PowerShell 5.0.
This example will authorize the local DHCP server.
configuration Example
{
Import-DscResource -ModuleName 'PSDscResources' -ModuleVersion '2.12.0.0'
Import-DscResource -moduleName 'DhcpServerDsc'
WindowsFeature 'DHCP'
{
Name = 'DHCP'
Ensure = 'Present'
}
xDhcpServerAuthorization 'LocalServerActivation'
{
IsSingleInstance = 'Yes'
Ensure = 'Present'
}
}
This example will authorize a remote DHCP server.
configuration Example
{
Import-DscResource -moduleName 'DhcpServerDsc'
xDhcpServerAuthorization 'RemoteServerActivation'
{
IsSingleInstance = 'Yes'
Ensure = 'Present'
DnsName = 'ServerToAuthorize.contoso.com'
IPAddress = '192.168.0.1'
}
}