Posts

Showing posts with the label Script

Recycle Application Pool using Command Line

IIS 6 uses different management scripts than IIS 7. This is important to note as all your target environments may not have same version of IIS. To recycle Application Pool in IIS 6, use the following script (in .bat file): @set apppool=SharePoint - testportal.mycompany.com80 cscript.exe %windir%\system32\iisapp.vbs /a "%apppool%" /r To recycle Application Pool in IIS 7, use the following: @set apppool=SharePoint - testportal.mycompany.com80 %windir%\system32\inetsrv\appcmd recycle apppool /apppool.name:"%apppool%" Make sure there is no space between “apppool.name:” and "%apppool%" otherwise you’ll receive an error.