Sign up ×

How to remote restart an IIS7 Application pool

Please note that the source computer and target computer are running IIS7 in windows 2008 Server R2 so would have to be using Powershell.


share|improve this question

2 Answers 2

From a remote machine you would need to run the following command to restart the IIS7 application pool:

Invoke-Command -ComputerName "webserver_computerName" -Credential $credentials_from_last_step -ScriptBlock { Add-PSSnapin WebAdministration; Restart-WebItem 'IIS:\AppPools\DefaultAppPool' }

Please use this link which can help you to control IIS7 remotely with PowerShell.

More info about Restart-WebItem is here:

Restart-WebItem => Restarts an application pool or a Web site.

share|improve this answer

You can also just change the web.config file (add a space or make a change). This will cause the application pool to be recycled as there may be changes in the app configuration file.

share|improve this answer

Your Answer


