Yes, you can perform a full system image backup of a Windows installation
with a script that you can call either post-install or as a FirstLogon or SetupComplete script in your autounattend.xml environment. The built-in Windows tool for this is
wbadmin
. Here's how to do it:
WBADMIN Command for Full Backup
wbadmin start backup -backupTarget:D: -allCritical -quiet
- -backupTarget: The drive or network share where the backup image will be stored (change
D:
to any suitable location that is NOT the OS drive).
- -allCritical: Ensures all critical volumes (including the OS and boot partitions) are backed up.
- -quiet: Suppresses prompting.
With this, Windows will create a full system image, similar to the "Create a system image" option in the legacy Control Panel. You can restore from it using a Windows Recovery/Setup disk.
How to Automate with autounattend.xml
Place your script in
C:\Windows\Setup\Scripts\SetupComplete.cmd
or use the
<FirstLogonCommands>
or
<RunSynchronous>
/
<RunAsynchronous>
in the specialize or oobeSystem passes:
Example: (FirstLogonCommands snippet)
Code:
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Full System Backup</Description>
<CommandLine>wbadmin start backup -backupTarget:D: -allCritical -quiet</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
You must ensure your backup target (e.g., D
exists and has enough free space!
Notes & Best Practices
- For network backups, use:
-backupTarget:\\Server\Share
- Don't use the Windows partition as the target.
- This works on Windows 10/11 Pro/Enterprise.
References & More Info
- Users have verified that
wbadmin
can back up all critical partitions to another drive using this approach .
- For advanced solutions, tools like Macrium Reflect or Clonezilla can be invoked from WinPE or WinRE, but
wbadmin
is native and works from within Windows unattended setup.
Summary:
Integrate
wbadmin start backup -backupTarget:X: -allCritical -quiet
as a CMD task post-setup for a true, restorable Windows system image as part of your unattend workflow .
Let me know if you need sample SetupComplete.cmd or PowerShell logic, or specific details for network or removable storage targets!