Stopping websites using Stop-Website is, apparently, not the same as stopping them using the IIS Manager.
Stop-Website 'Some site'
iisreset.exe
# site is started again
Using IIS Manager, the state is the same after a reset/reboot. I guess stopping a site using IIS Manager modifies some sort of persistent configuration (the registry?).
Can anyone tell me how I can use PowerShell to stop a site permanently, so that a reset/reboot does not bring the site online again?
(Stop-WebAppPool exhibits exactly the same behavior.)
Best Answer
Joseph's answer makes perfect sense, but it doesn't seem to work.
The attribute 'serverAutoStart' on the site node in
applicationHost.config
is not changed.One way to change is:
but that's a mouthful.
Another way is:
It's also interesting that this attribute is not directly editable in IIS Manager, you have to go into the
Configuration Editor
to change it.Yes, starting or stopping the site in IIS Manager changes that attribute, but that's not obvious to the user.