Sometimes when your system experiences some issues, the only viable option at hand could be performing a factory reset.
In general, you can reset your PC using the utility tool through the GUI. However, if you are using Windows Recovery Environment, accessing the command prompt may be a more convenient or only option.
But can you factory reset your PC only with Command Prompt?
Table of Contents
Factory Reset With Command Prompt
Performing a factory reset restores your PC to default configuration. It wipes all the applications and other data from your system. After the reset, it will reinstall Windows OS and any programs installed by the PC manufacturer.
Here’s how you can factory reset your PC with the Command Prompt:
- If you can’t log in, start/restart your PC. Press and hold the Power button until it shuts off.
- Do this three times, and the next boot will load Windows Recovery Environment.
- Now, go through Advanced Options > Troubleshoot > Command Prompt.
- Type
cd C:\windows\system32
and press Enter. - If you can log in, press Windows + R and type cmd. Then press Ctrl + Shift + Enter to launch Command Prompt as administrator cmd.
- Type
systemreset -factoryreset
on the Command Prompt and press Enter. - You’ll get a choice to keep your files or remove everything.
- If you select Keep my files , it will preserve everything inside
C:\Users\<current user>
. where,<current user>
= your username. - Whereas, if you choose Remove everything, the system will delete everything even your personal files.
Both options will still remove any installed applications.
- If you select Keep my files , it will preserve everything inside
- If you choose to Remove everything, your system displays this menu.
You can recover deleted contents if you choose Just remove my files. However, if Remove files and clean the drive is choosen, deleted contents can be harder to recover. We recommand you choose the latter option if you have any system issues. - Before resetting, do a final check of all the apps that will be removed by clicking the given option.
- Finally, click Reset to initiate the factory reset.
Clean PC With Command Prompt
Another way to completely reset your PC is to perform a Fresh start. This method goes one step beyond factory restore and removes even the preinstalled applications. The Microsoft store apps are still reinstalled, though.
Follow the steps below to perform a fresh start:
- Run Command Prompt as an administrator.
- Type
cd C:\Windows\system32
and press Enter to go to this directory. - Enter the
systemreset -cleanpc
command. - Click on Next to start the process.
Format C Drive
You need to format the C drive if you can’t load the Windows Recovery Environment. It will cleanly install a new Windows OS on your system after removing all the data. Follow the instructions below to do so:
- Boot your PC through a Windows Installation Media.
- In the interface, select your language preferences, time and currency format, and input method. Then, click on the Next button to continue.
- On the install screen, click on Repair your computer. It will take you to WinRE.
- Go to Command Prompt. Type the command:
format c: /fs:ntfs
and press Enter. - Enter Y to proceed with the formatting.
Frequently Asked Questions
Do I need to reset my PC?
We recommend only resetting your PC as the final solution to fix any system problems. Before trying to reset your PC, it is better to use the System Restore feature in Windows.
It can restore your system configurations to a restore point lacking system errors. Please use the command rstrui
to initiate a system restore.
How can I keep my installed applications during the reset?
Performing a factory reset will remove your installed applications in all scenarios. To retain your apps, you can reset your PC to a refresh image. The older versions of Windows had a recimg tool to create the image, but it has been removed in the newer ones.
You can still perform this method with the DISM tool. Use the follow
- Download and install ADK and create a bootable Windows PE media.
- Then, go to the WinPE command prompt.
- You must have a recovery image to use this method.
- You can create the image with the command:
dism /Capture-Image /CaptureDir:C:\ /ImageFile:D:\recoveryimage\install.wim /Name:windows
. - Change the ImageFile directory and name as you wish.
- Enter the command
dism /Apply-Image /D:\recoveryimage\install.wim /Index:1 /ApplyDir:C:\
to reset to the image.