How to set an application pool restart time in PowerShell

Home > Blogs > PowerShell > How to set an application pool restart time in PowerShell

How to set an application pool restart time in PowerShell

Like This Blog 0 Jason Helmick
Added by April 5, 2013

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

Videos You May Like

How to Build in a PSMethod to your PowerShell Code

0 65 0

In this video, PowerShell instructor Jason Yoder shows how to add Methods (PSMethod) to your code using free software that’s added into the PSObject. For instructor-led PowerShell courses, see our course schedule. Microsoft Windows PowerShell Training Download the Building Methods PowerShell script</a> used in this video. <# ╔══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ Building Methods ║ ╟──────────────────────────────────────────────────────────────────────────────╢ … Continue reading How to Build in a PSMethod to your PowerShell Code

How to use the PowerShell Script Analyzer to Clean Up Your Code

0 1211 2

In this video, PowerShell instructor Jason Yoder demonstrates how you can use the PowerShell Script Analyzer to help you format your code to best-practices. For instructor-led PowerShell training classes, see our course schedule: Microsoft Windows PowerShell Training Download the PowerShell Analyzer scripts used in this video. <# ╔══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ PowerShell Script Analyzer ║ … Continue reading How to use the PowerShell Script Analyzer to Clean Up Your Code

OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj

0 246 1

In this video, Cisco CCNA & CCNP instructor Mark Jacob shows how to troubleshoot OSPF Adjacency issues by showing the distance between routers with the show ip ospf neighbor command.

Write a Comment

Share your thoughts...

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