码迷,mamicode.com
首页 > 其他好文 > 详细

通过 powershell 配置 IIS

时间:2014-07-16 12:26:18      阅读:1084      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   os   width   2014   

1. 设置iis pool:

bubuko.com,布布扣

cls
Import-Module WebAdministration
Get-ChildItem IIS:\apppools | ForEach-Object{
        $name = $_.name
        Write-Host $_.name

        $pool = Get-Item IIS:\AppPools\$name
        $pool.recycling.periodicRestart.time = [TimeSpan]::Zero
        $pool | Set-Item

        Clear-ItemProperty "IIS:\AppPools\$($pool.Name)" -Name recycling.periodicRestart.schedule
        Set-ItemProperty "IIS:\AppPools\$($pool.Name)" `
            -Name recycling.periodicRestart.schedule -Value @{value=‘01:01:00‘}
}

 

 

2. 设置startup time limit

bubuko.com,布布扣

#Add-PSSnapin Microsoft.SharePoint.PowerShell
        Get-ChildItem IIS:\apppools | ForEach-Object{
            C:\windows\system32\inetsrv\appcmd  set apppool $_.name  /processModel.startupTimeLimit:00:10:00
        }

通过 powershell 配置 IIS,布布扣,bubuko.com

通过 powershell 配置 IIS

标签:style   blog   http   os   width   2014   

原文地址:http://www.cnblogs.com/fengwenit/p/3848173.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!