How to set an application pool restart time in PowerShell
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
Application Pool, AppPools, DefaultAppPool, IIS Manager, Pool restart time, Powershell, Remote Servers, Remoting
How to Build in a PSMethod to your PowerShell Code
0 68 0In 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 1229 2In 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 247 1In 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.