India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How Do I Restart IIS via Command Prompt?

Buy domains, business emails, hosting, VPS and more: Get Started

Cheapest Domains in Kenya

Get your .Co.uk or .Com domain now for just $6.94 (Back to $5.89 in 7 days)

.CO.UK for $6.94 | .COM for $10.87

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?

An impact scale comparing three IIS restart scopes

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 W3SVC with NET STOP and NET START

All IIS websites during the stop

A documented change explicitly requires a full IIS reset

Run iisreset /restart

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.

Mysson Victor
Author

Mysson Victor

Digital Marketer and SEO Strategist Nairobi

Mysson is a Digital Marketing Lead and SEO Strategist specializing in organic search growth, conversion optimization, and marketing systems built with artificial intelligence.

His work focuses on search engine optimization, content strategy, WordPress marketing infrastructure, AI driven automation, and online business growth.

Mysson has built and scaled several content driven websites to more than 50,000 monthly visitors through organic search, using advanced keyword research, search focused content creation, and conversion optimization strategies.

His publishing portfolio includes platforms such as The PennyMatters and Moneyspace, where he writes practical guides on personal finance, blogging, technology, and digital growth.

At Cloudoon, the company behind Truehost, Olitt, and CloudPap, Mysson serves as the Digital Marketing Lead, where he oversees SEO strategy, organic growth initiatives, and conversion focused marketing systems across multiple digital products.

Beyond SEO, Mysson designs high converting WordPress landing pages and marketing funnels, combining UX design, search intent, and conversion optimization to improve lead generation and revenue.

He also builds AI powered marketing systems using low code platforms such as Lovable and Google AI Studio, developing tools that automate content workflows, data analysis, and marketing operations.

Through his work in digital publishing and marketing technology, Mysson focuses on turning complex digital strategies into practical systems that help businesses and creators grow online.

View All Posts