New-CMBootableMedia cmdlet fails in ConfigMgr 2103

If you recently upgraded to ConfigMgr 2103 you may notice that your existing PowerShell script to create boot media fails after the upgrade. The reason is a code change that requires the New-CMBootableMedia cmdlet to run x86 PowerShell to work. According to a tweet from Mark Silvey (@configmgrdev), this will be addressed in upcoming releases. But for now, simply run your script in x86 PowerShell, and the problem goes away.

Symptom

Below is a sample script to generate a boot media ISO file in PowerShell

$ISOFile = "E:\Setup\Zero_Touch_WinPE_10_x64_OSD_Toolkit.iso"
$BootImage = Get-CMBootImage -Name "Boot image (x64)"

$DP = Get-CMDistributionPoint -SiteSystemServerName "DP01.corp.viamonstra.com"
$MP = Get-CMManagementPoint -SiteSystemServerName "CM01.corp.viamonstra.com"

# Delete ISO if exist
If (Test-Path $ISOFile){Remove-Item $ISOFile -Force -ErrorAction SilentlyContinue -Confirm:$false}

New-CMBootableMedia -MediaMode SiteBased -MediaType CdDvd -Path $ISOFile -AllowUnknownMachine -BootImage $BootImage -DistributionPoint $DP -ManagementPoint $MP

If you run the above script in ConfigMgr 2013, in x64 PowerShell, it will fail with the following error:

New-CMBootableMedia : Could not find the ConfigMgr UI installation directory

Workaround

Run the script from x86 PowerShell, and the problem goes away.

Happy Deployment, Johan

About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

>