I'm taking over IIS maintenance for someone who just left and for some reason they copied the config files to a different drive and pointed IIS to look at them instead of the default C:\WINDOWS\System32\inetsrv\config.
QUESTION: How do I change it back to the default path? I assume I'll have to copy the current config files to the default directory first to maintain the configuration...
Thank you!
Scott
For anyone reaching this page due to an error locating the shared config file which completely blocks access to the IIS settings, you can run the below in PowerShell:
Import-Module WebAdministration
[System.Reflection.Assembly]::LoadFrom("C:\windows\system32\inetsrv\Microsoft.Web.Administration.dll") | Out-Null
$serverManager = New-Object Microsoft.Web.Administration.ServerManager
$config = $serverManager.GetRedirectionConfiguration()
$redirectionSection = $config.GetSection(“configurationRedirection”)
$redirectionSection.Attributes["enabled"].Value = “false”
$serverManager.CommitChanges()
This basically just turns off Shared Configuration so you can then access the IIS server manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With