In this blog I’ll walk you through how to resolve a Windows restart loop.
If you already understand how to boot to the Windows PE environment you may want to skip to Part 3 for the process
Causes
A restart loop can be caused through different scenarios but can be attributed to poorly maintained servers or servicing operations that are unable to complete.
These issues can be hugely frustrating without an obvious way to resolve and could mean degregation of service or downtime for your business
The context around this blog is to confirm the action to take when a servicing operation fails to execute correctly at start up and causes a restart loop
Aim
The aim here is to break the restart loop so you can login to troubleshoot the servicing issue
Take Control of the Situation
You’ll need one of a couple of things to get started
1. Windows with a recovery partition
2. Windows Media
3. Create a Windows PE ISO
Build a Windows Pre-installation Environment (WinPE)
Windows Pre-installation Environment allows you to load an environment that will allow you to interact with the Windows file system and registry prior to Windows loading.
Download WinPE (Windows PE)
Create bootable WinPE media
Tip
Additional tools can be added to the Windows PE to assist with certain scenarios.
In the example below we’ll walkthrough adding the BitLocker tools so that if the drive is encrypted it can be managed from Windows PE
- Launch the Deployment and Imaging Tools Enviroment

2. Change directory to the Windows Preinstallation Environment with the following commands
- CD..
- CD “.\Windows Preinstallation Environment”
3. Create a working directory for WinPE with the sources files for the media
- copype amd64 c:\WinPE

This creates the folders below with the boot.wim file

Take notice of the empty mount directory where we will expand the contents of the boot.wim

4. Use DISM to customize boot.wim
- DISM /Mount-Image /ImageFile:”C:\winpe\media\sources\boot.wim” /Index:1 /mountdir:”C:\winpe\mount”

The mount directory is populated

Customize WinPE
5. Navigate to the correct path
- CD amd64
- CD WinPE_OCs

6. Add the WinPE-WMI component with DISM
- DISM /Add-Package /Image:“C:\winpe\mount” /PackagePath:winpe-wmi.cab

- DISM /Add-Package /Image:”C:\winpe\mount” /PackagePath:winpe-securestartup.cab

7. Add Language Support
- CD en-gb
- DISM /Add-Package /Image:”C:\winpe\mount” /PackagePath:winpe-wmi_en-gb.cab

8. Confirm the packages got installed
- DISM /Get-Packages /Image:”C:\winpe\mount”

Commit Changes
Now all the features have been added the changes need to be committed to the boot.wim file
9. dism /unmount-image /mountdir:”c:\winpe\mount” /commit

Create Bootable Media from WinPE
Now create a bootable ISO image that can be used to load WinPE
- MakeWinPEMedia.cmd /iso c:\winpe c:\winpe.iso

In Part 2 we’ll look at using the media to resolve a restart loop