Error: "XDDS:E2699DED Image preparation step 'EnableDHCP' failed"

Error: "XDDS:E2699DED Image preparation step 'EnableDHCP' failed"

book

Article ID: CTX201520

calendar_today

Updated On:

Description

When attempting to create Machine Catalog using Machine Creation Service the task fails with "ErrorID: Image preparation step 'EnableDHCP' failed".
Catalog creation fails when attempting to query and enable DHCP and an exception is given. System.Management.ManagementException: Critical error.

Resolution

To fix the issue, you need to rebuild the WMI Repository. Run the following script on the master image to test if WMI can be queried. If the script runs successfully WMI repository does not need to be rebuilt.

$mgmtScope = $null
$condition = "PhysicalAdapter=TRUE and AdapterTypeId=0"
$selectedProperties = $null
 
$mgmtScope = New-Object System.Management.ManagementScope
$mgmtScope.Path.NamespacePath = "root\cimv2"
 
$ObjectSearcher = New-Object System.Management.ManagementObjectSearcher($mgmtScope, (New-Object System.Management.SelectQuery("Win32_NetworkAdapter", $condition, $selectedProperties)))
$enumOptions = New-Object System.Management.EnumerationOptions
$enumOptions.EnsureLocatable = $true
$ObjectSearcher.Options = $enumOptions
$adapters = $ObjectSearcher.Get()
 
$adapters
 
foreach($adapter in $adapters)
{
Write-Host $adapter.Name
}

Problem Cause

WMI repository issue.

Issue/Introduction

When attempting to create Machine Catalog using Machine Creation Service the task fails with ErrorID: Image preparation step 'EnableDHCP' failed