Restart Windows Explorer using command line

Abstract: Resolve frozen taskbars and unresponsive desktop icons by restarting Windows Explorer via command line without rebooting.

Created: 2026-09-14 by
Restarting Windows Explorer via the command line is a quick way to resolve UI glitches, frozen taskbars, or unresponsive desktop icons without rebooting your computer. This process involves terminating the explorer.exe process and immediately relaunching it, restoring the graphical shell to a clean state.

Why Restart Explorer?

Windows Explorer (explorer.exe) manages the user interface, including the taskbar, start menu, file explorer windows, and desktop icons. Over time, this process can accumulate memory leaks, become unresponsive, or fail to update file associations correctly. While restarting the entire system fixes these issues, it is disruptive and requires saving all open work. Using the command line allows you to refresh the shell instantly, often resolving temporary display errors or stuck context menus. This technique is particularly useful for advanced users who prefer keyboard shortcuts and automated scripts over navigating through Task Manager.

Method 1: The One-Liner Command

The most efficient method uses a single command that kills the process and restarts it in sequence. Open the Command Prompt or PowerShell as an administrator. Then, type the following command and press Enter:
taskkill /f /im explorer.exe && start explorer.exe
This command works by first using taskkill with the /f flag to force-terminate any instance of explorer.exe. The && operator ensures that the second part of the command only runs if the first succeeds. Finally, start explorer.exe launches a new instance of the shell. Your screen may flash black briefly as the UI disappears and reappears. This method is safe and reversible, making it ideal for quick troubleshooting sessions.

Method 2: Using PowerShell for Better Control

PowerShell offers more robust error handling and logging capabilities compared to the traditional Command Prompt. If you are working in an enterprise environment or need to script this action, PowerShell is the preferred tool. Open PowerShell as Administrator and run:
Stop-Process -Name explorer -Force; Start-Process explorer
Here, Stop-Process targets the process by name rather than image name, which can be more precise. The semicolon acts as a command separator, ensuring the restart happens after termination. This approach provides clearer feedback if the process fails to stop, helping you diagnose deeper system issues. It is also easier to integrate into larger automation scripts or scheduled tasks.

Common Issues and Troubleshooting

Sometimes, the restart command may not work as expected due to permission issues or locked files. If you receive an access denied error, ensure you are running the terminal with administrative privileges. In rare cases, third-party shell extensions can prevent Explorer from restarting cleanly. If the taskbar remains missing after execution, check for conflicting software or corrupted system files. Running sfc /scannow can help repair underlying system integrity issues that might interfere with shell operations. For more information on command-line diagnostics, see Understanding Recursion in the Windows Attrib Command. Another common problem is that the command prompt itself closes unexpectedly if it was launched from within Explorer. To avoid this, always open your terminal from the Start Menu or a pinned shortcut. Additionally, if you have multiple monitors, the restart might reset window positions. Be prepared to rearrange your workspace after the shell reloads. This behavior is normal and indicates that the new instance has started fresh without loading previous session states.

Automating the Process

For users who frequently encounter Explorer glitches, creating a batch file or a desktop shortcut can save time. Create a new text file, paste the one-liner command, and save it with a .bat extension. Double-clicking this file will perform the restart instantly. You can also assign a hotkey to this shortcut for even faster access. This method is particularly useful for IT support staff who need to assist remote users quickly. By standardizing the restart procedure, you reduce the time spent on minor UI disruptions.

Safety Considerations

While restarting Explorer is generally safe, it does close all open File Explorer windows. Ensure you have saved any unsaved work in those windows before executing the command. Data in other applications like browsers or word processors remains unaffected, as they do not rely on Explorer for core functionality. However, any drag-and-drop operations in progress will be interrupted. Always verify that no critical processes depend on the shell before forcing a restart. This precaution helps prevent accidental data loss during routine maintenance.

Frequently Asked Questions

Will restarting Explorer close my open programs?

No, restarting Windows Explorer only affects the user interface components like the taskbar and file explorer. Your active applications, such as web browsers or office suites, remain running and unaffected by this operation. Only windows managed directly by Explorer, such as folder views, will close and reopen.

How do I restart Explorer if the taskbar is frozen?

If the taskbar is unresponsive, you can still use the command line by pressing Ctrl+Shift+Esc to open Task Manager. From there, select File > Run new task, type cmd, and check the box to create this task with administrative privileges. Once the command prompt opens, execute the standard kill and restart commands.

Can I automate this restart on a schedule?

Yes, you can use Windows Task Scheduler to run the batch file containing the restart command at specific intervals. This is useful for systems prone to memory leaks in the shell. Configure the task to run with highest privileges to ensure the taskkill command executes successfully without permission prompts.

What should I do if Explorer fails to restart?

If Explorer does not return after the command, try restarting the Windows Resource Manager service via Services.msc. Alternatively, boot into Safe Mode and run a system file check using sfc /scannow. Persistent failures may indicate corrupted system files or incompatible shell extensions that need to be removed.

Is there a difference between restarting Explorer and rebooting?

Rebooting the entire system clears all system memory and resets every running process, including drivers and background services. Restarting Explorer only refreshes the graphical shell, leaving other system components intact. This makes the command-line method significantly faster and less disruptive for resolving UI-specific issues.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More