IIS 6 IIS 7 Windows 2003 Windows 2008 Windows 7 Windows Vista

Restarting IIS using the command-line

You can restart IIS and disable Reliable Restart using the command prompt and Iisreset.exe. See the following command-line usage and parameters.

iisreset [computername]
/RESTART Stop and then restart all Internet services.
/START  Start all Internet services.
/STOP Stop all Internet services.
/REBOOT  Reboot the computer.
/REBOOTONERROR   Reboot the computer if an error occurs when starting, stopping, or restarting Internet services.
/NOFORCE Do not forcefully terminate Internet services if attempting to stop them gracefully fails.
/TIMEOUT:val Specify the timeout value (in seconds) to wait for a successful stop of Internet services. On expiration of this timeout the computer can be rebooted if the /REBOOTONERROR parameter is specified. The default value is 20s for restart, 60s for stop, and 0s for reboot.
/STATUS Display the status of all Internet services.
/ENABLE  Enable restarting of Internet Services on the local system.
/DISABLE Disable restarting of Internet Services on the local system.

Example (restart IIS on local computer):

iisreset /restart

IIS 6 Linux SSL Windows 2003 Windows XP

Setup self-signed certificate on IIS 6

Create a self-signed SSL certificate with SelfSSL from the IIS 6.0 Resource Kit.

The IIS 6.0 Resource Kit contains a utility called SelfSSL.exe for quickly and easily creating and installing a self-signed certificate into IIS 6 for Windows 2003 or XP.

  • Download IIS 6.0 Resource Kit Tools
  • Install the resource kit
  • Go to Programs IIS Resources SelfSSL and select “SelfSSL”
  • Execute the following (modify for your environment):
    selfssl.exe / /K:1024 /V:180 /S:56792119 /P:443 /T

  • Go to https://localhost to test.

Explanation of selfssl.exe switches (used in command above):

  • / – common name of the certificate.
  • /K:1024 – key length.
  • /V:180 – number of days certificate is valid.
  • /S:56792119 – IIS site ID.  Default is 1 for “default site.”
  • /P:443 – SSL port.
  • /T – Adds the self-signed certificate to “Trusted Certificates” list.
IIS 6 IIS 7 Win 7 Win7 Windows Windows 2008 Windows 7 Windows Vista Windows7

IIS 7 Log Files Default Location

In Internet Information Services 7 Microsoft changed the default log files location.

IIS 7 Log files location


IIS 6 Log files location