I need to set all times for IIS pools to be recycled each 2 minutes apart. I want to create a script in PS that would set that up for me. This is how it looks:"
$AppPool = Get-IISAppPool
$AppPoolName = $AppPool | select -ExpandProperty name
foreach ($pool in $AppPoolName) {
#Set-ItemProperty -Path IIS:\AppPools\$pool -Name recycling.periodicRestart.time -Value 3.00:00:00
}
How do I add 2min each time? -Value 3.00:00:00 -Value 3.00:02:00 -Value 3.00:04:00 etc