Skip to content

xDhcpServerClass

dscbot edited this page Aug 18, 2023 · 2 revisions

xDhcpServerClass

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String Class Name
Type Key String Class Type, Vendor or User Vendor, User
AsciiData Key String Class Data, in ASCII format
Description Write String Class Description
AddressFamily Key String Class address family. Currently needs to be IPv4 IPv4
Ensure Key String Whether the DHCP server Class should exist Present, Absent

Description

The xDhcpServerClass DSC resource manages vendor and user DHCP classes.

Requirements

  • Target machine must be running Windows Server 2012 R2 or later.
  • Target machine must be running at minimum Windows PowerShell 5.0.

Examples

Example 1

This example creates a new DHCP Server class.

configuration Example
{
    Import-DscResource -ModuleName 'PSDscResources' -ModuleVersion '2.12.0.0'
    Import-DscResource -moduleName 'xDhcpServer'

    WindowsFeature 'DHCP'
    {
        Name   = 'DHCP'
        Ensure = 'Present'
    }

    xDhcpServerClass 'VendorClass'
    {
        ensure        = 'Present'
        Name          = 'VendorClass'
        Type          = 'Vendor'
        AsciiData     = 'sampledata'
        AddressFamily = 'IPv4'
        Description   = 'Vendor Class Description'
    }
}