If you want to know how to configure DHCP and SCCM to support both Legacy BIOS and UEFI mode in your SCCM environment, please read this great post by Marco Nuijens: https://marconuijens.com/2018/01/04/supporting-both-legacy-and-uefi-modes-in-your-sccm-environment/
It explains all you need to know.

Then … what is this post good for?

First of all like all my other blog posts it’s a personal knowledge saver and that link is definitely worth remembering.

Second, my current environment has a quite extensive DHCP landscape consisting of a number of DHCP site servers and a central DHCP failover server with each of them holding quite a number of DHCP scopes – which would result in quite a lot of clicking if I did it manually.

This is why I pretty much converted the content of the above post into a simple PowerShell script. Simple means: no consistency checks, just a bunch of commands that run in order and do the job:

    Prepares DHCP servers for parallel use of legacy and UEFI boot via SCCM PXE.
    - Creates vendor classes for different boot modes
    - Creates policies to apply options based on boot mode
    - Creates server options for different boot modes
    - If required, deletes scope options
    For details about the performed tasks, please see https://marconuijens.com/2018/01/04/supporting-both-legacy-and-uefi-modes-in-your-sccm-environment/
.PARAMETER ComputerName
    FQDN of the DHCP server to be configured.
    IP address of the SCCM server providing the PXE service point at the specified site.
    IP adresses of the scopes you want to add the policies to.

    Version  : 1.0
    Created  : 19/06/2020
    Author   : P.Stork
    History  :
    2020-06-19 P.Stork Script created
    2020-06-22 P.Stork Documentation

    Prepare-DhcpLegacyAndUefi.ps1 -ComputerName dhcpsiteserver01.contoso-.com -SccmIp -Scopes,


# ***** Per server configuration *****

#Add DHCP vendor options for different boot modes
Add-DhcpServerv4Class -ComputerName $ComputerName -Name "PXEClient (UEFI x64)" -Type Vendor -Data "PXEClient:Arch:00007" -Description "PXEClient:Arch:00007"
Add-DhcpServerv4Class -ComputerName $ComputerName -Name "PXEClient (UEFI x86)" -Type Vendor -Data "PXEClient:Arch:00006" -Description "PXEClient:Arch:00006"
Add-DhcpServerv4Class -ComputerName $ComputerName -Name "PXEClient (BIOS x86 & x64)" -Type Vendor -Data "PXEClient:Arch:00000" -Description "PXEClient:Arch:00000"

# ***** Per subnet configuration *****

foreach ($Scope in $Scopes) {
    #Remove existing scope options 060, 066 and 067 as they would conflict the new policy values
    Remove-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 060,066,067

    #Add DHCP policy and options to be applied on UEFI x86 boot
    Add-DhcpServerv4Policy -Computername $ComputerName -ScopeId $Scope -Name "PXEClient (UEFI x86)" -Description "Bootfile for UEFI x86 devices" -Condition Or -VendorClass EQ, "PXEClient (UEFI x86)*"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 060 -Value PXEClient -PolicyName "PXEClient (UEFI x86)"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 066 -Value $SccmIP -PolicyName "PXEClient (UEFI x86)"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 067 -Value smsboot\x86\wdsmgfw.efi -PolicyName "PXEClient (UEFI x86)"

    #Add DHCP policy and options to be applied on UEFI x64 boot
    Add-DhcpServerv4Policy -Computername $ComputerName -ScopeId $Scope -Name "PXEClient (UEFI x64)" -Description "Bootfile for UEFI x64 devices" -Condition Or -VendorClass EQ, "PXEClient (UEFI x64)*"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 060 -Value PXEClient -PolicyName "PXEClient (UEFI x64)"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 066 -Value $SccmIP -PolicyName "PXEClient (UEFI x64)"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 067 -Value smsboot\x64\wdsmgfw.efi -PolicyName "PXEClient (UEFI x64)"

    #Add DHCP policy and options to be applied on legacy BIOS boot
    Add-DhcpServerv4Policy -Computername $ComputerName -ScopeId $Scope -Name "PXEClient (BIOS x86 & x64)" -Description "Bootfile for BIOS devices" -Condition Or -VendorClass EQ, "PXEClient (BIOS x86 & x64)*"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 066 -Value $SccmIP -PolicyName "PXEClient (BIOS x86 & x64)"
    Set-DhcpServerv4OptionValue -ComputerName $ComputerName -ScopeId $Scope -OptionId 067 -Value smsboot\x64\wdsnbp.com -PolicyName "PXEClient (BIOS x86 & x64)"

Some more background

  • How can I change scope options to server options?
    The above script uses scope options though the original blog post uses server options instead. If you want to use server options, just delete the “-ScopeId”-parts from all commands.
  • Why do I use scope options (instead of server options)?
    The reason I use scope options is that server options can only be set once per server. If you have a central DHCP failover server which serves as a failover partner for several DHCP site servers, scope options are the only way to go for some options. However, this relates to the failover functionality that I use, it does not have any impact on the legacy and UEFI boot functionality itself.