Adding DaRT to ConfigMgr Boot Images – And starting it earlier than early

Here is a guide on how to add Microsoft Diagnostics and Recovery Toolset (DaRT) to a ConfigMgr boot image so it starts first in the boot process, making it possible to remote into WinPE as soon as the boot image has loaded, even before the PXE password and ConfigMgr prestart commands.

Update 2020-09-07: Added support for WinPE from Windows ADK 2004, without this update/fix you wouldn't see command prompt windows in the remote viewer. This is a workaround for a known issue in ADK 2004.

Note: This solution is for ConfigMgr only, for a MDT Lite Touch version of this post, go here:

Credits: Thanks to Alexey Semibratov who created the initial EnableDart.wsf script, and to Sergey Korotkov for the tip on using the /_SMSTSCurrentActionName variable. Also a big thank you to Johan Schrewelius for finding the fix for Windows ADK 2004.

Edit Post ‹ Deployment Research — WordPress


Back in 2011 I wrote a blog post on how to add DaRT to a ConfigMgr 2007 boot image, a scenario that eventually made it into the MDT integration with ConfigMgr 2012 and continued for ConfigMgr Current Branch. The challenge with the implementation Microsoft decided on is that starts quite late in the process, in fact after you selected a task sequence. So various folks (like Alexey) started instead to launch the DaRT component via prestart command in ConfigMgr. But even that is quite late. For example if you have a password protected boot image, the password prompt is before the prestart command runs. I wanted it start even earlier, hence this blog post.


You need to have DaRT 10, MDT and the ConfigMgr console installed in order to modify the boot image. Earlier MDT versions should work since the DaRT code haven't changed in a long time, but I haven't tested. Monitoring needs to be enabled on your deployment share, and your CustomSettings.ini file needs to be configured for monitoring (EventService variable set).

You also need to download the sample files:

Note: Adding the solution will increase the boot image WIM size with about 7 – 8 MB (16.5 MB uncompressed), shouldn't be a big deal 🙂

Step-by-step Guide

1. Copy the downloaded sample files to a folder, I used C:\Setup\EnableDart.

2. Modify line 13-19 in the Add-DaRTtoBootImage.ps1 script to fit your environment (boot image, sample scripts folder, site server, site code etc.)

3. Modify line 9 in the Unattend.xml file to fit your environment (server name, and monitoring service port)

4. Run the Add-DaRTtoBootImage.ps1 script from an elevated PowerShell prompt.

5. Done 🙂

The DaRT remote connection waiting in the lower left corner.

Happy Deployment, Johan

About the author

Johan Arwidmark

5 3 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
Ivan Spiridonov
Ivan Spiridonov
6 months ago

You're my favorite person on the planet right now

11 months ago

I am looking to use file shortcuts instead of the event service. What do I need to add to make that happen?

Marek Sedláček
Marek Sedláček
1 year ago

Hello, Johan,
thanks for the great work and i have a question or rather a suggestion. In our company, the OSD installation often starts from USB FlashDisc and with the Static IP configuration, but Dart is already started with the APIPA address. Could it be solved somehow?
Thank you for your time. Marek

Last edited 1 year ago by Marek Sedláček
Dennis Roteliuk
Dennis Roteliuk
1 year ago

Hi again Johan,
I figured out the problem.
Thanks again for your work on this.

Dany Bouchard
Dany Bouchard
1 year ago

Hello there! First things first, thanks you.
I'm using 2004 ADK and i've added the FIX (the new EnableDart.wsf) to my boot image.
It works like a charm, but just in the first boot.
On the next reboot, it stops working, and when i look in the registry, the "HKCU\Console\ForceV2" is back to 1.

I've looked back in the X:\Deploy\Enabledart.wsf and its the latest version with the fix.
What do you think i'm missing Johan?

Dany Bouchard
Dany Bouchard
1 year ago

Its the same image, i've doublechecked. On the screenshot you can see the content of X:\Deploy\Enabledart.wsf after the reboot into WINPE. Note that its a reboot from WINPE to WINPE.

After the reboot i can still connect to Dart but theres a hint, maybe its the cause:
EnableDart.log tells me it executed just once, on the first boot into WINPE. Later it prestaged(it sets back the registry keys to the original) and rebooted. Since the EnableDart script doesnt seem to execute on the second boot, F8 stops working.

Christian Riiser
Christian Riiser
1 year ago

Now, I might be way off here. But just asking. Can this be done -without- MDT bootimage? Or am I just reading this wrong and infact the boot image is -not- MDT but native CM?

Oh. And HI !! 😀

Adam Perry
Adam Perry
1 year ago

I have performed the steps above, but now my test VM will PXE boot and download the boot image but then it reboots as soon as the download is finished. I have injected all kinds of drivers into it even though I've read that you don't have to add drivers if you're using a Hyper-V VM. We are using SCCM 1910 with MDT integration. Any help you can offer would be appreciated.

1 year ago

Excellent thanks. Had to remember to check "deploy this boot image from the PXE-enabled distribution point", which foxed me for a while but got there in the end 🙂