How to Factory Reset from Command Prompt in Windows? September 2025

Stuck at a command prompt screen and need to factory reset your Windows computer? You’re in the right place. This guide shows you exactly how to factory reset from command prompt using proven methods that actually work.

Whether your Windows won’t boot normally, you’re locked out of your account, or you just prefer using command-line tools, you’ll learn multiple ways to reset this PC command prompt style. I’ll cover everything from the basic systemreset -factoryreset command to advanced recovery techniques.

The best part? You don’t need to be a computer expert. I’ll explain each step in simple terms, so anyone can follow along and successfully reset Windows from cmd.

Why Factory Reset from Command Prompt?

Before diving into the commands, let’s understand when you’d need to factory reset from command prompt instead of using Windows Settings:

Common scenarios include:

  • Windows won’t boot to the desktop
  • You’re locked out of your user account
  • Settings app crashes or won’t open
  • You prefer command-line efficiency
  • Preparing multiple PCs for deployment
  • System corruption prevents a normal reset

Using the command for factory reset through CMD gives you direct access to Windows recovery tools, bypassing any interface issues.

The Main Factory Reset Command

For those in a hurry, here’s the primary system reset command you need:

systemreset -factoryreset

This command launches the Windows reset process where you can choose to keep or remove your files. But there’s much more to know about properly using this command, especially when things don’t work as expected.

Method 1: Using systemreset -factoryreset (Standard Method)

This is the most common way to reset Windows from the command prompt. Here’s the complete process:

Step 1: Open Command Prompt as Administrator

If Windows boots normally:

  1. Press Windows + X
  2. Select “Windows Terminal (Admin)” or “Command Prompt (Admin)”
  3. Click “Yes” when prompted

If Windows won’t boot:

  1. Force shutdown your PC (hold power button for 10 seconds)
  2. Turn on and force a shutdown again during boot
  3. On the third start, Windows enters Recovery Environment
  4. Navigate to: Troubleshoot > Advanced options > Command Prompt

Step 2: Run the Factory Reset Command

Type this command and press Enter:

systemreset -factoryreset

Step 3: Choose Your Reset Option

You’ll see two choices:

  • Keep my files: Removes apps and settings but keeps personal files
  • Remove everything: Complete wipe (best for selling or major issues)

Step 4: Select Reinstall Method

Choose between:

  • Cloud download: Downloads fresh Windows files (requires internet)
  • Local reinstall: Uses existing Windows files (faster, works offline)

Step 5: Confirm and Wait

Review the summary and click “Reset”. The process takes 20-60 minutes, depending on your system.

Method 2: Fresh Start with systemreset -cleanpc

For a cleaner Windows reset from the command prompt, use the Fresh Start option:

systemreset -cleanpc

This command:

  • Keeps your personal files
  • Removes ALL installed programs (including manufacturer bloatware)
  • Installs the latest Windows version
  • Provides the cleanest Windows experience

Perfect for: Removing stubborn malware or starting completely fresh while keeping documents.

Method 3: System Restore Using Command Prompt

If you need to reset the command prompt to an earlier state without a full factory reset:

rstrui.exe

This opens System Restore where you can:

  1. Select a restore point from before your issues started
  2. Preview affected programs
  3. Restore Windows to that earlier state

Note: This only affects system files and programs, not personal documents.

Troubleshooting: When Commands Don’t Work

Error: “systemreset -factoryreset” Does Nothing

If the factory reset command prompt returns you to the command line without action:

Solution 1: Check your location

cd /d %windir%\system32 systemreset -factoryreset

Solution 2: Use the full path

C:\Windows\System32\systemreset.exe -factoryreset

Error: Access Denied or Permission Issues

Some users report that the command for factory reset fails due to permissions:

  1. Ensure you’re running as an administrator
  2. If locked out by password, this method won’t work
  3. You’ll need to create installation media instead

Error Code: 0xc0000225

This indicates corrupted boot files. Try:

bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd

Then attempt the reset again.

Alternative: Reset from Windows Recovery Environment

If direct commands fail, access the graphical reset option:

  1. From Command Prompt, type: exit
  2. Select “Troubleshoot”
  3. Choose “Reset this PC”
  4. Follow the on-screen wizard

This uses the same underlying system reset command but with a visual interface.

Before You Reset: Important Preparations

Back Up Your Data

Even when choosing “Keep my files,” backups are crucial:

  • Copy important documents to the external drive
  • Note down installed programs
  • Export browser bookmarks
  • Save license keys

Check Recovery Image Status

Verify your recovery environment is intact:

reagentc /info

If disabled, enable it:

reagentc /enable

Note Your Windows Version

Some older Windows 10 versions use different commands:

winver

For versions before 1703, you might need wuauclt commands instead.

Advanced Techniques for IT Professionals

Silent Reset Without Prompts

For automated deployments, you can script the reset:

Start-Process systemreset -ArgumentList “-factoryreset” -Wait

Custom Recovery Images

Create your own recovery image:

recimg /createimage C:\RefreshImage

Then use it for reset:

systemreset -factoryreset -customimage C:\RefreshImage

Network Reset Integration

Combine with network reset for a complete refresh:

netsh winsock reset netsh int ip reset systemreset -factoryreset

Common Issues and Solutions

Reset Stuck at Percentage

If your factory reset using cmd freezes:

  1. Wait at least 2 hours (some systems are slow)
  2. If truly stuck, force shutdown
  3. Boot to recovery and run:

chkdsk /f /r C:

sfc /scannow

  1. Retry the reset

“Reset Failed, No Changes Made”

This typically means corrupted system files:

  1. Run system file checker:

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

  1. Use DISM to repair:

DISM /Image:C:\Windows /Cleanup-Image /RestoreHealth

  1. Attempt reset again

Can’t Access Command Prompt

If you can’t reach CMD to windows reset from command prompt:

  1. Create Windows installation media on another PC
  2. Boot from USB/DVD
  3. Press Shift+F10 at the setup screen for Command Prompt
  4. Run your reset commands

Post-Reset Steps

After successfully using reset this pc command prompt:

Initial Setup

  1. Choose region and keyboard layout
  2. Connect to Wi-Fi
  3. Sign in with Microsoft account or create a local account
  4. Configure privacy settings

Essential Tasks

  • Run Windows Update immediately
  • Install antivirus software
  • Update all drivers
  • Reinstall essential programs
  • Restore backed-up files

Optimization

Check out our guide on running Windows Update from the Command Line to quickly update your fresh system.

When Factory Reset Isn’t Enough?

Sometimes a factory reset from command prompt won’t solve deeper issues:

Hardware Problems

  • Bad RAM can cause reset failures
  • Failing hard drives need replacement
  • Overheating prevents a successful reset

BIOS/UEFI Issues

  • Outdated firmware can block a reset
  • Secure Boot conflicts
  • Legacy vs UEFI boot modes

Alternative Solutions

If reset fails repeatedly, consider:

  • Clean Windows installation
  • Linux live USB for data recovery
  • Professional data recovery services

Tips for Specific Scenarios

Resetting Without Password

If locked out and need to know how to reset command prompt access:

  1. You cannot use system reset commands
  2. Must use installation media
  3. Consider password reset tools first
  4. Check our troubleshooting guide for network issues after a reset

Corporate or Domain-Joined PCs

Special considerations for business computers:

  • Remove from the domain first if possible
  • Back up network profiles
  • Note down VPN configurations
  • Save the mapped drive information

Preparing PC for Sale

When using factory reset using CMD before selling:

  1. Use “Remove everything” option
  2. Choose “Remove files and clean drive”
  3. Run multiple passes for security
  4. Remove device from Microsoft account online

Frequently Asked Questions

What’s the difference between systemreset -factoryreset and -cleanpc?

The systemreset -factoryreset command gives you options to keep or remove files, while systemreset -cleanpc always keeps files but removes ALL programs including manufacturer software. Use -cleanpc for the freshest Windows experience.

Can I factory reset Windows 11 using the same commands?

Yes! The factory reset from command prompt process works identically in Windows 11. The same systemreset commands function in both Windows 10 and 11, though the visual interface looks slightly different.

Why does my reset fail with “No changes were made”?

This error usually indicates corrupted system files or a damaged recovery partition. Run sfc /scannow and DISM repair commands first. If that fails, you’ll need installation media to perform a clean install instead of a reset.

How long should a factory reset take?

A typical windows reset from command prompt takes 20-60 minutes. Factors affecting time include: choosing cloud vs local reinstall, amount of data, drive speed (SSD vs HDD), and system specifications. If it takes over 3 hours, something may be wrong.

Is it safe to interrupt a factory reset?

Never interrupt a reset this pc command prompt process unless absolutely necessary. Interruption can corrupt Windows beyond repair. If you must stop it, you’ll likely need installation media to recover. Always wait at least 2-3 hours before considering interruption.

Can I schedule an automatic factory reset?

While you can’t schedule the interactive system reset command, IT professionals can script automated resets using PowerShell and Task Scheduler. This requires careful planning to avoid accidental data loss. Most users should stick to manual resets.

What if I can’t boot to recovery environment?

If you can’t access recovery mode to factory reset using cmd, create Windows installation media on another computer. Boot from it and press Shift+F10 during setup to open Command Prompt. You can then attempt repair commands or perform a clean installation.

Conclusion

Mastering the ability to factory reset from the command prompt gives you powerful control over Windows recovery. Whether you’re troubleshooting a problematic PC or preparing systems for deployment, these command-line tools provide reliable solutions.

Remember the key commands:

  • systemreset -factoryreset for standard reset with options
  • systemreset -cleanpc for fresh start keeping files
  • rstrui.exe for system restore

Always back up important data first, and don’t hesitate to use installation media if the built-in reset fails. With these tools and techniques, you can confidently handle any Windows reset situation.

WhoIsMcAfee Avatar