Skip to content

Instantly share code, notes, and snippets.

@abelal83
Created January 8, 2018 10:12
Show Gist options
  • Save abelal83/3a7fbd90ba1fb36e9312a125d8c783d2 to your computer and use it in GitHub Desktop.
Save abelal83/3a7fbd90ba1fb36e9312a125d8c783d2 to your computer and use it in GitHub Desktop.
$assembly = [System.Reflection.Assembly]::LoadFrom("$env:systemroot\system32\inetsrv\Microsoft.Web.Administration.dll")
$manager = new-object Microsoft.Web.Administration.ServerManager
# load appHost config
$config = $manager.GetApplicationHostConfiguration()
Write-Host "Unlocking system.webServer/handlers"
$section = $config.GetSection('system.webServer/handlers')
$section.OverrideMode = 'Allow'
$manager.CommitChanges()
Write-Host "Unlocked system.webServer/handlers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment