IIS 7.5 - Change the path to the .config administration file

I’m doing IIS maintenance for someone who just left, and for some reason they copied the configuration files to another drive and pointed IIS to look at them instead of the standard C: \ WINDOWS \ System32 \ inetsrv \ config.

QUESTION: How do I change it to the default path? I assume that I will have to copy the current configuration files to the default directory in order to save the configuration ...

Thank!

Scott

+3
source share
3 answers
  • Click on the server in IIS Manager.
  • Scroll down to the "Management" section.
  • Double-click General Configuration
  • Disable this to take advantage of local configuration settings.
+1

, - , IIS, 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()

, IIS.

+3

"IIS":

  • .
  • .
  • .
  • .
+1

All Articles