1

Can I remotely recycle a certain application pool of IIS 8.5 on Windows Server 2012 R2?

I want to trigger this when logged onto another computer running Windows 7 with a domain user account that is in the admin group of the remote server.

1

One way that could work would be to download and install a Utility called PSExec - http://technet.microsoft.com/en-us/sysinternals/bb896649

Copy contents to a folder on the Compuer you log onto and add the PSExec command to that users login script.

Psexec.exe \\{IIS8server} "appcmd recycle apppool app_pool_name"
| improve this answer | |
2

To execute commands remotely, you'd normally wrap them in a powershell Invoke-Command command with the -ComputerName parameter.

So you could wrap the appcmd command in an Invoke-Command command.

There is a native IIS powershell snapin, but I'm not a big fan of it. It's a bit clunky to use and to get working reliably (and its another dependancy you need to maintain. Invoke-Command works on pretty much anything that has winrm configured).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.