I need to set the serviceAutoStartProvider and serviceAutostartEnabled properties on some websites with powershell.
This cmdlet works on website with web application:
Set-ItemProperty IIS:\Sites\$websiteName\$webApplicationName -name serviceAutoStartEnabled -Value 'True'
With website without web application, I'm doing this
Set-ItemProperty IIS:\Sites\$websiteName -name serviceAutoStartEnabled -Value 'True'
But it doesn't work, I got this error
Property serviceAutoStartEnabled is not found
When I check the applicationHost.config file of IIS, every website have a default webapplication, so, how can I set these properties on the root site ?
Thank you,