Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.5 - Change path of administration.config file

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

like image 202
user973259 Avatar asked Apr 18 '12 13:04

user973259


2 Answers

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.

like image 88
Deadly-Bagel Avatar answered Sep 19 '22 05:09

Deadly-Bagel


  1. Click on the server in IIS Manager.
  2. Scroll down to the "Management" section.
  3. Double-click "Shared Configuration"
  4. Turn this off to resort to local configuration settings.
like image 32
Ste Avatar answered Sep 19 '22 05:09

Ste