Skip to content

Instantly share code, notes, and snippets.

@markjfletcher
Created November 17, 2020 19:46
Show Gist options
  • Save markjfletcher/d61be8d9b460eb430e06c9a3d2caef60 to your computer and use it in GitHub Desktop.
Save markjfletcher/d61be8d9b460eb430e06c9a3d2caef60 to your computer and use it in GitHub Desktop.
Using IISAdministration Powershell Module to change an Application Pool
Import-Module IISAdministration
$timeSpan = New-TimeSpan -Minutes 0
$manager = Get-IISServerManager
$pool = $manager.ApplicationPools["$poolName"]
$pool.ChildElements["processModel"].Attributes["idleTimeout"].Value = $timeSpan
$manager.CommitChanges()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment