Filters:

  • Technologies

  • Instructors

  • How to set an application pool restart time in PowerShell

    Want to change the restart time of an application pool? You can do it in the graphical IIS Manager, but if you’re trying to set the time for multiple pools, or on remote servers, why not use PowerShell.

    To get an application pools current restart time:

    PS> Get-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.time

    To change the restart time:

    PS>Set-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.time -Value 3.00:00:00

    Use Powershell remoting and you can change the application pool restart time on remote servers:

    PS>Invoke-Command –ComputerName web1,web2,web3 { Set-ItemProperty -Path IIS:\AppPools\DefaultAppPool -Name recycling.periodicRestart.time -Value 3.00:00:00}

    Knowledge is PowerShell,

    Jason Helmick
    Systems Instructor
    Interface Technical Training

    You may also like:  Creating a SharePoint 2013 PowerShell Help Document with Examples

    Share your thoughts...

    Please fill out the comment form below to post a reply.