Very often, we see discussions that include the advice to make a backup image of your system. Frequently, this advice is targeted to people who simply don't make regular backups and have no backup software.
For those individuals, I've created a little batch file that will use the command line WBADMIN to make an image backup. In addition, it will export all drivers from the system so that you have a separate backup of all drivers ready to be re-imported on a clean installation.
Before everyone hammers me on this: Yes, I know that the built-in disk imaging utility in Windows is horrible. Yes, I know it is deprecated. But it can still prove useful if it is all that you have.
One weird quirk of WBADMIN is that it creates the backup only in a folder named WindowsImageBackup in the root of the target drive and locks it down so that you have no access to the contents. So, after the backup is created this batch file will traverse that WindowsImageBackup folder giving the current user ownership of all files / folders.
To use, just copy the text below into a text file and name it something.bat (any name with a .bat extension is fine).
For those individuals, I've created a little batch file that will use the command line WBADMIN to make an image backup. In addition, it will export all drivers from the system so that you have a separate backup of all drivers ready to be re-imported on a clean installation.
Before everyone hammers me on this: Yes, I know that the built-in disk imaging utility in Windows is horrible. Yes, I know it is deprecated. But it can still prove useful if it is all that you have.
One weird quirk of WBADMIN is that it creates the backup only in a folder named WindowsImageBackup in the root of the target drive and locks it down so that you have no access to the contents. So, after the backup is created this batch file will traverse that WindowsImageBackup folder giving the current user ownership of all files / folders.
To use, just copy the text below into a text file and name it something.bat (any name with a .bat extension is fine).
Batch:
:: *****************************
:: * Quick Backup *
:: * by Hannes Sehestedt *
:: * Last update June 20, 2025 *
:: *****************************
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This batch file will make a backup copy of all drivers installed on your ::
:: system and then it will use WBADMIN to make a disk image backup of your ::
:: system (C:, Recovery partition, EFI Partition) to a drive that you will ::
:: specify. WBADMIN will only backup to the root of a drive creating a folder ::
:: by the name of WindowsImageBackup. Another annoyance is that sets ::
:: permissions on that folder in a way that makes easy access difficult. So, ::
:: to work around this, after the backup is created this batch file will give ::
:: the currently logged on user ownership and permission to access this folder. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
setlocal enabledelayedexpansion
setlocal enableextensions
cd /d %~dp0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check to see if this batch file is being run as Administrator. If it is not, then rerun the batch file ::
:: automatically as admin and terminate the intial instance of the batch file. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
(Fsutil Dirty Query %SystemDrive%>Nul)||(PowerShell start """%~f0""" -verb RunAs & Exit /B)
::::::::::::::::::::::::::::::::::::::::::::::::
:: End Routine to check if being run as Admin ::
::::::::::::::::::::::::::::::::::::::::::::::::
:: Ask for the drive letter to which backups should be saved.
echo Enter the drive letter to which we should backup the system and save drivers.
echo Please enter the letter only (no colon).
echo.
set /p Target="Enter the target drive letter (letter only): "
:: Create a folder named Drivers_Backup on the target drive
:: We will save a copy of all drivers to this location.
md %Target%:\Drivers_Backup
pnputil /export-driver * %Target%:\Drivers_Backup
:: Perform the disk image backup
wbadmin start backup -backuptarget:%Target%: -allcritical -quiet
:: Take ownership of the WindowsImageBackup folder on the target drive
set SourcePath=%Target%:\WindowsImageBackup
C:\windows\system32\takeown /f "%SourcePath%"
icacls "%SourcePath%" /grant %username%:F
C:\windows\system32\takeown /f "%SourcePath%\*.*" /r /d y
icacls "%SourcePath%\*.*" /T /grant %username%:F
cls
echo All operations have been completed.
echo.
pause
My Computers
System One System Two
-
- OS
- Win11 Pro 24H2
- Computer type
- PC/Desktop
- Manufacturer/Model
- Self-built
- CPU
- Intel i7 11700K
- Motherboard
- ASUS Prime Z590-A MB
- Memory
- 64GB (Waiting for warranty replacement of another 64GB for 128GB total)
- Graphics Card(s)
- No GPU - Built-in Intel Graphics
- Sound Card
- Integrated
- Monitor(s) Displays
- HP Envy 32
- Screen Resolution
- 2560 x 1440
- Hard Drives
- 1 x 1TB NVMe SSD
1 x 2TB NVMe SSD
1 x 4TB NVMe SSD
3 x 512GB 2.5" SSD
1 x 4TB 2.5" SSD
5 x 8TB Seagate Barracuda HDD
- PSU
- Corsair HX850i
- Case
- Corsair iCUE RGB 5000X mid tower case
- Cooling
- Noctua NF-S12A chromax.black.swap case fans (Qty. 7) & Home Computer Specifications, Configuration, and Usage Notes General Specifications ASUS Prime Z590-A motherboard, serial number M1M0KC222467ARP Intel Core i7-11700K CPU (11th Gen Rocket Lake / LGA 1200 Socket) 128GB Crucial Ballistix RGB DDR4 3200 MHz DRAM (4 x 32GB) Corsair iCUE RGB 5000X mid tower case Noctua NH-D15 chromax.black CPU cooler Noctua NF-S12A chromax.black.swap case fans (Qty. 7) & Corsair LL-120 RGB Fans (Qty. 3)
- Keyboard
- Corsair K70 Max RGB Magnetic Keyboard
- Mouse
- Logitech MX Master 3
- Internet Speed
- 1Gb Up / 1 Gb Down
- Browser
- Edge
- Antivirus
- Windows Defender
- Other Info
- The five 8TB drives and three 512GB SSDs are part of a DrivePool using StableBit DrivePool software. The three SSDs are devoted purely to caching for the 8TB drives. All of the important data is stored in triplicate so that I can withstand simultaneous failure of 2 disks.
Networking: 2.5Gbps Ethernet and WiFi 6e
-
- Operating System
- Win11 Pro 23H2
- Computer type
- Laptop
- Manufacturer/Model
- Lenovo ThinkBook 13x Gen 2
- CPU
- Intel i7-1255U
- Memory
- 16 GB
- Graphics card(s)
- Intel Iris Xe Graphics
- Sound Card
- Realtek® ALC3306-CG codec
- Monitor(s) Displays
- 13.3-inch IPS Display
- Screen Resolution
- WQXGA (2560 x 1600)
- Hard Drives
- 2 TB 4 x 4 NVMe SSD
- PSU
- USB-C / Thunderbolt 4 Power / Charging
- Keyboard
- Backlit, spill resistant keyboard
- Mouse
- Buttonless Glass Precision Touchpad
- Internet Speed
- 1Gb Up / 1Gb Down
- Browser
- Edge
- Antivirus
- Windows Defender
- Other Info
- WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor