This article describes when IIS configuration changes might not be saved and how to work around the issue.
Symptoms
When you make changes to the Internet Information Services (IIS) configuration through the Microsoft Management Console (MMC) or through scripting, some changes may not be saved after you use the iisreset command from the MMC or from a command prompt with no command line parameters.
Cause
The IISReset command line tool waits for a normal shutdown of the services before it starts them again. Because of the number of services that are dependent on the IISAdmin service, the shutdown may not occur in a timely manner. When this happens, IISReset forces the shutdown of the services. This can result in metabase changes that are not saved properly.
Solution
To save the IIS configuration to the metabase, use the net stop and net start commands to stop and start the services.
To stop IIS services:
net stop iisadmin /y
Note: Take note of each of the services that depend on the IISAdmin Service, because you need to restart each of these services in the next step.
Example:
To start IIS services:
net start w3svc net start httpfilter
Note: Because W3SVC and the other services that are listed depend on the IISAdmin Service, the IISAdmin Service is started automatically when the W3SVC service is started.
See also
- IISReset May Not Save IIS Configuration Changes on the
Microsoft KB.
Applies to
Product
Component
Other