In Windows Server, system restore is a great utility to roll back system to the previous state if any emergency happens to system. You can run system restore from inside Windows with Recovery Wizard, or you can run Windows Server 2012 system restore with command line.
Why use command line to do system restore?
Command Prompt is available on every Windows NT-based operating system which includes Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows 2000, as well as Windows Server 2012/2008/2003.
Sometimes, however, a problem is so bad that your computer won't start normally, meaning you can't run System Restore from inside Windows. Fortunately, even if all you can do is start in Safe Mode and access Command Prompt, you can start the System Restore by executing a simple command.
Also, using command line is more convenient for batch files and batch commands.
Wbadmin values for system restore in Windows Server 2012
authsysvol: Performs an authoritative restore of Sysvol.
showsummary: Reports the summary of the last run of this command. This parameter cannot be accompanied by any other parameters.
quiet: Runs the command with no prompts to the user.
How to restore Windows Server 2012 with Wbadmin
As above mentioned, when you cannot start your computer normally, you can run Windows Server 2012 system restore with command line from recovery options.
Boot the Windows Server into WinRE with the installation disc if needed. At Windows Setup interface, click Repair your computer. Select Troubleshoot. Then choose Command Prompt in the advanced options.
At the prompt, type: wbadmin start systemstaterecovery –version:01/09/2013-18:28 –backuptarget:E: This means run system state recovery from system state backup at E drive created at 18:28pm in 01/09/2013.
For example, to run a system state recovery of the backup from 04/30/2005 at 9:00 A.M. that is stored on the remote shared folder \\servername\share for server01, type:
wbadmin start systemstaterecovery -version:04/30/2005-09:00 -backupTarget:\\servername\share -machine:server01
To recover the system state using Windows Server Backup, you must be a member of the Backup Operators or Administrators group, or you must have been delegated the appropriate authority.
Another way to do Windows Server 2012 system restore with command line
AOMEI Backupper Server is a professional backup and restore software. It can be used to backup and restore the system from graphic users interface or command line. It supports both Windows system (Windows 7/8/8.1/10/XP/Visa) and Windows Server system (Windows Server 2003/2008/2008r2/2012/2012R2/2016).
Before you run Windows Server 2012 system restore with command line by AOMEI Backupper, make sure you have already created a system backup, and you can check if system image backup is intact and without error by using Check Image utilities. Also, if you cannot boot your computer, create a bootable media.
After all this done, let’s take a look at how to run Windows Server 2012 (R2) system restore from command prompt.
Step 1: Boot the machine from the bootable media, and it will bring you to the interface of AOMEI Backupper. Then open Windows shell command under Utilities tab.
Tip: if you can boot the computer, press Win + R and type cmd to open command prompt.
Step 2: Type in the following command in command prompt to navigate to AOMEI Backupper installation directory by typing in: cd [installation path of AOMEI Backupper] and press Enter. For example: cd C:\Program Files\AOMEI Backupper. Note that the drive letters might change under Windows PE environment.
Step 3: Run the following command to start restore: AMBackup /r /t [backup type] /s "[backup location path]" /d [destination location]
For example: To restore the system backup saved in D:\system backup to disk 2.
AMBackup /r /t system /s “D:\system backup\system backup.adi” /d 2
If you want to perform a universal restore, AOMEI command line still can do this for you.
For example: Restore system in the image named "system backup10.adi" to the partition 0 on disk 0 and perform a universal restore.
AMBackup /r /t system /s "D:\system backup\system backup10.adi" /d 0:0 /x
Besides system restore, this can be used to perform disk restore and partition restore.
Also, it is very easy to create data backup using CMD and clone with command line.
All in all, there are two methods to create Windows Server 2012 (R2) system restore with command line, you can choose one based on your preference.
If you want to protect unlimited PCs and servers within your company, you may chooseAOMEI Backupper Technician Plus. It offers unlimited billable technical services to clients. It also enables you to copy installation directory for portable version creation.