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.

Comments

Popular posts from this blog

Unable to delete Shared Services Provider in SharePoint (MOSS)

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Cannot add a SimpleContent column to a table containing element columns or nested relations