Created
April 4, 2016 19:44
-
-
Save davops/ecde130fe609bcb5cb2c81fcc4f58401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Verify IIS Settings using PowerShell v3 | |
Import-Module Webadministration | |
$appName = (Get-ChildItem -Path IIS:\apppools).name | |
foreach($appPool in $appName) | |
{ | |
#Rapid Fail Protection | |
$rapid = (Get-Item "IIS:\AppPools\$appPool").failure.rapidFailProtection | |
if (!($rapid -eq "True")) | |
{Write-Host "Error: The rapid fail protection for $appPool is $rapid." -ForegroundColor Yellow} | |
#Idle Timeout | |
$idle = (Get-Item "IIS:\AppPools\$appPool").processModel.idleTimeout | |
if (!($idle -eq "00:20:00")) | |
{Write-Host "Error: The idle Timeout for $appPool is $idle" -ForegroundColor Yellow} | |
#Queue Length | |
$queue = (Get-Item "IIS:\AppPools\$appPool").queueLength | |
if (!($queue -eq "1000")) | |
{Write-Host "Error: The queueLength for $appPool is $queue" -ForegroundColor Yellow} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment