This script powershell script will recycle all IIS application pools instead of restarting the application pool.
Write-Host "App Pool Recycling Started...." -ForegroundColor Magenta & $env:windir\system32\inetsrv\appcmd list apppools /state:Started /xml | & $env:windir\system32\inetsrv\appcmd recycle apppools /in Write-Host "App Pool Recycling Completed" -ForegroundColor Magenta
- Create a file with extension .ps1 and add below script and save at any location. (for example i am saving at C:\MyScript\ with file name AppPoolRecycle.ps1
- Now open powershell as Administrator and run by using command C:\MyScript\AppPoolRecycle.ps1
Linux/Windows System and SQL Server Database Administrator with more than 4.5 years of experience in Linux Servers administration, Windows Administration, Network Administration, SQL Server Administration, MySQL Administration and SQL Programming.