Wbadmin is an elevated command prompt that allows administrators or backup operators to backup and restore an operating system (OS), volume, file, folder or application.

Wbadmin replaced NT backup, the tool used to create backups in systems before Windows Server 2008. It can be used with Windows Server 2008 R2, Windows Server 2012, Microsoft Windows Vista, Windows 7, Windows 8 and Windows 10.

What does wbadmin do?

The wbadmin.exe utility is a command line utility built into Windows, since Windows Vista/Server 2008. The command is used to back up and restore operating systems, drive volumes, files, folders and applications from a command-line interface (CLI). The wbadmin utility saves the image backup in a WindowsImageBackup folder on the target drive. To perform all the backup tasks, an individual must have the appropriate permissions, such as being a member of the backup operators or administrator group.

Features of wbadmin

Excluding backup operations, wbadmin supports two types of restore operations:

  • Bare-metal restore. Using the Windows Recovery Environment (RE) a user can complete a full server restoration to either the same server or to a server with dissimilar hardware.
  • Individual file and folder and system state restore. Using wbadmin, a user can restore files, folders or the machine's system state from the command line.

The wbadmin utility replaces the Microsoft Windows Backup command-line tool NTBackup, which came built into Windows NT 4.0, Windows 2000, Windows XP and Windows Server 2003. Wbadmin is the command-line version of backup and restore.

A disk-based backup system, wbadmin can create a bare metal backup to restore the Windows operating system to either similar or dissimilar hardware. The backup files created are mainly in the form of Microsoft's Virtual Hard Disk (VHD) files, with some accompanying XML configuration files.

The backup VHD file can be mounted in Windows Disk Manager for viewing content -- the VHD backup file isn't a direct disk clone, however. The backed-up image can be restored later through the Windows RE, either to the same computer or to a new computer of a different brand and type.

Wbadmin also has a graphical user interface (GUI) option to make it easier to create and restore a computer backup. Workstation editions use a backup wizard located in the control panel. The server version is done through a Windows feature using the Windows Management Console, which simplifies restoration, regardless of if it's a single file or multiple folders.

Using the command-line or GUI, wbadmin creates a backup that can be restored using just the Windows Media installation DVD and the backup files located on a USB flash drive, without having to reinstall from scratch.

Wbadmin uses a differencing engine to update the backup files. Once the original backup file is created, the Volume Shadow Copy Service (VSS) updates the changes. Automatic backups can be scheduled on a regular basis using a Wizard.

List of subcommands

The subcommands for wbadmin backups include:

  • Wbadmin enable backup configures and enables a regularly scheduled backup.
  • Wbadmin disable backup disables daily backups.
  • Wbadmin start backup runs a one-time backup. If used without parameters, it uses the settings from the daily backup schedule.
  • Wbadmin stop job stops the currently running backup or recovery operation.
  • Wbadmin get versions lists details of backups recoverable from the local computer or, if another location is specified, from another computer.
  • Wbadmin get items lists the items included in a backup.
  • Wbadmin start recovery runs a recovery of the volumes, applications, files or folders specified.
  • Wbadmin get status shows the status of the currently running backup or recovery operation.
  • Wbadmin get disks lists the disks that are currently online.
  • Wbadmin start systemstaterecovery runs a system state recovery.
  • Wbadmin start systemstatebackup runs a system state backup.
  • Wbadmin delete systemstatebackup deletes one or more system state backups.
  • Wbadmin start sysrecovery runs a recovery of the full system (at least all the volumes that contain the state of the operating system). This subcommand is only available if users are using the Windows RE.
  • Wbadmin restore catalog recovers a backup catalog from a specified storage location in the event that the backup catalog on the local computer has been corrupted.
  • Wbadmin delete catalog deletes the backup catalog on the local computer. A user uses this subcommand only if the backup catalog on the local computer is corrupted and there aren't any backups stored at another location that can be used to restore the catalog.

How to run wbadmin

To use wbadmin.exe, a user must open an elevated command prompt with administrator permission and then run a backup command based on the specific needs. To open an elevated command prompt, click Start, right-click Command Prompt and then click Run as administrator.

To use the wbadmin utility on Windows Server 2016/2012 R2, a user has to install the Windows Server Backup component using the Server Manager or PowerShell: Install-WindowsFeature -Name Windows-Server-Backup.

In Windows Server 2016, the wbadmin utility supports more features and options, including:

  • Get disks
  • Get virtualmachines
  • Start systemstaterecovery
  • Start systemstatebackup
  • Delete systemstatebackup

The wbadmin functionality in Windows 10 is adequate enough for a user to create a backup copy of the Windows image and individual hard drives.

For instance, a user can create a backup of the Windows 10 operating system image, add the F: disk to the backup, and write it on a drive E: wbadmin start backup -backupTarget:E: -include:F: -allCritical –quiet.

When a user creates a backup, the WindowsImageBackup directory is created on the disk that's specified in the backupTarget parameter where the system backup image is saved.

The include parameter lets the user specify the disks to be included to the image backup. The allCritical parameter is used to ensure that all the partitions needed to restore the system are added to the image backup.

When a user runs the backup command, they will see the progress of the backup and the list of partitions that it contains. It's important to note that the Windows backup system is based on the Volume Shadow Copy Service. The wbadmin utility creates a shadow copy or snapshot of the specified volume and creates a system image backup based on this snapshot.

A user can back up multiple folders and save them to a separate drive: wbadmin start backup –backupTarget:e: -include:c:\docs\,c:\backup –vsscopy.

A user can also save the backup to a shared network folder: wbadmin start backup –backupTarget:\\srv1\backup -include:c:\docs\,c:\backup.

However, this wbadmin mode isn't supported on desktop versions of Windows. When a user runs that command, they will get the following error: "A partial backup of volumes is not supported on this version of Windows."

The user can create an automatic backup task that backs up a system image and specified folder or drives once a day: wbadmin enable backup -include:c:\docs\* -addtarget:e: -allCritical -schedule:00:00.

The list of available backups can be displayed with the command: wbadmin get versions.

Delete all copies except the last two: wbadmin delete systemstatebackup -keepversions:2.

The user can only delete the oldest backup copy: wbadmin delete systemstatebackup –backupTarget:e: –deleteOldest -quiet.

This was last updated in April 2020

Continue Reading About wbadmin

Dig Deeper on IT operations and infrastructure management

Cloud Computing
Enterprise Desktop
Virtual Desktop