Reputation: 201
I want to use the powershell command Stop-IISSite but i don't want to have the confirmation dailog.
Stop-IISSite -Name "WebSiteName"
The "-Confirm" parameter doesn't work on my tests, is there any option to force this stop?
Upvotes: 3
Views: 1544
Reputation: 414
You can user
Stop-IISSite -Name "WebSiteName" -Confirm:$false
it worked in my case
Upvotes: 5
Reputation: 3042
Run powershell as administrator.
Import-Module IISAdministration
Stop-WebSite 'Default Web Site'
Upvotes: 0