To restart IIS from Command Prompt, open Command Prompt as an administrator and run:
iisreset /restart
That is the direct full-reset command. However, Microsoft recommends restarting the IIS web service with NET STOP and NET START instead. This method protects configuration changes that may still be saving and shows which dependent service fails if the restart does not complete.
net stop w3svc
net start w3svc
Both approaches interrupt websites while IIS is unavailable. Use a maintenance window, confirm that you are on the correct server and choose the narrowest restart that can solve the problem.
Restart IIS with the Recommended Commands
These steps restart the World Wide Web Publishing Service, whose service name is W3SVC.
1. Prepare for a short interruption
Check active deployments, scheduled jobs and monitoring alerts before you stop the service. Users may receive errors until W3SVC starts again. In-memory session state may also be lost when IIS services stop, so avoid an unplanned restart on a busy production server.
If the incident affects only one application pool, skip the server-wide restart and use the narrower method later in this guide.
2. Open an elevated Command Prompt
Open the Start menu, search for Command Prompt, right-click it and select Run as administrator. Approve the User Account Control prompt.
The commands can fail with an access-denied message when the window is not elevated.
3. Stop W3SVC
Run:
net stop w3svc
Wait for Windows to report that the service stopped successfully. Do not close the window before starting it again.
4. Start W3SVC
Run:
net start w3svc
Windows should report that the service started successfully. If it names a failed dependency, record that service and error instead of repeatedly issuing a full reset.
5. Verify the service and websites
Query the service state:
sc.exe query w3svc
The output should include STATE with RUNNING. The SC query command reports service state, exit codes and wait information.
A running service does not prove that every application works. Test each important hostname from another device or monitoring location. Check a real page or health endpoint, confirm that authentication works and review the Windows Event Viewer and IIS logs for new errors.
When Should You Use iisreset /restart?
Use this command only when you intentionally want a broad IIS reset and accept its wider impact:
iisreset /restart
IISReset.exe stops and restarts IIS services. Microsoft documents the /restart option, but its newer support guidance says not to use IISReset for routine service restarts.
There are two practical reasons:
Configuration changes still being saved can be lost.
A failed reset gives less useful information about the individual service that could not stop or start.
If an old deployment runbook requires iisreset, confirm why it needs the full reset before running it. A familiar command is not automatically the safest command.
Restart One IIS Application Pool Instead
An application pool isolates one or more IIS applications from other pools. If one application is unhealthy while the rest of the server works, recycling that pool usually has a smaller blast radius than restarting W3SVC.
You can call the IIS PowerShell command from an elevated Command Prompt:
powershell.exe -NoProfile -Command "Import-Module WebAdministration; Restart-WebAppPool -Name 'DefaultAppPool'"
Replace DefaultAppPool with the exact pool name. The PowerShell reference confirms that Restart-WebAppPool restarts a named application pool.
Recycling a pool still interrupts requests handled by that pool. Check the affected application immediately afterwards and review its logs if the fault returns.
Which Restart Scope Should You Choose?

Use the smallest scope that matches the failure:
Observed problem | First action | Likely impact |
|---|---|---|
One application is unhealthy | Restart its application pool | Applications in that pool |
All IIS websites are unavailable but Windows is healthy | Restart | All IIS websites during the stop |
A documented change explicitly requires a full IIS reset | Run | IIS services and hosted sites |
Windows itself is unstable or waiting on an operating-system update | Follow the change plan for an OS restart | The whole server |
Do not use an IIS command as a substitute for diagnosing resource exhaustion, certificate errors, failed deployments or database faults. A restart can clear symptoms without fixing their cause.
Common IIS Restart Errors
System error 5 or access is denied
Close the current window and reopen Command Prompt with Run as administrator. Confirm that your account has permission to administer the server.
The service name is invalid
Check that the IIS Web Server role and its management components are installed on that machine. Also confirm that you are not running the command on your local workstation while intending to administer a remote server.
Run this read-only check:
sc.exe query w3svc
If Windows cannot find W3SVC, do not keep retrying the restart command. Verify the server role and the target machine first.
IIS starts but the website still fails
Test the site by hostname rather than by service state alone. Then check:
the affected application pool state;
recent deployment changes;
IIS access and failed-request logs;
Windows Application and System event logs;
bindings, certificates and DNS; and
application dependencies such as databases or external APIs.
Capture the first error before another restart changes the evidence.
A Safe Command Sequence to Keep
For a planned IIS web-service restart, this compact sequence gives you an explicit stop, start and state check:
net stop w3svc
net start w3svc
sc.exe query w3svc
Then test the hosted applications from outside the server. Use iisreset /restart only when the broader reset is deliberate and documented.
If you need a Windows Server environment you can administer directly, our VPS hosting page lists Windows Server options and full administrative access. If you would rather hand routine server work to a technical team, compare managed VPS before choosing a plan.
.com DomainsOwn the most recognised domain extension and earn trust at a glance.
Domain SearchYour ideal domain is only seconds away. Lock it in now.
UK DomainsBuild local trust instantly with a recognised .uk domain.
Whois LookupLook up domain owner information, renewal dates, and registration provider.
Domain TransferMove your domain with minimal disruption and full control
All DomainsChoose from a wide range of global domain extensions.
Web HostingDiscover cost-effective hosting packages designed for UK businesses.
Email HostingHost business email on your domain with enterprise-level security and effortless management.
Reseller HostingStart selling hosting today, even if you are not a tech expert.
Windows HostingGet peak performance for your Windows apps and websites.
cPanel HostingGet hosting managed through cPanel – effortlessly intuitive and globally recognised.
Affiliate ProgramEarn commission by referring customers to our services.
WordPress HostingFast, Optimised WordPress Hosting
VPS Hosting
Managed VPS Hosting
Dedicated Server



