Iis – Build server: Recycle IIS application pool on remote server without a VPN connection

build-serveriisvpn

I have a build server (Windows Server 2008) set up to pull down code from our SVN repository and build the web applications we develop. My current process involves using WinSCP to perform a remote sync that sends the updated files to our production server after a release build. This is working pretty well but sometimes our changes require that the IIS application pool be recycled so the newest files are server correctly. Since our production server is hosted by another provider I cannot use PsExec or PowerShell to kick the necessary app pool on the production server. Our production server does have a Cisco VPN client available and using that does allow me to run PsExec but I cannot be sure that the client will always be connected.

I am wondering how other people handle this situation and if there are any suggestions other than PsExec over the VPN. I am using Hudson to manage our build process so it's not a big deal to execute anything that can be scripted. Any suggestions are greatly appreciated.

Best Answer

WinRM (remote management). It looks like it takes more then a few steps to get it working securely over the Internet using HTTPS but it's designed for HTTP remote management and I've watched videos and read much on the topic of WinRM + PowerShell, etc. I just haven't used it remotely through firewall yet.

http://msdn.microsoft.com/en-us/library/aa384372(v=vs.85).aspx

updated versions of WinRM and PowerShell for 2008
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=d37e25cf-db05-4b23-a852-cdf865d81b82&displaylang=en

How-to
http://blogs.msdn.com/b/powershell/archive/2009/04/10/configuring-powershell-for-remoting-part-2-fan-in.aspx

http://thepowershellguy.com/blogs/posh/archive/2007/07/24/powershell-using-windows-remote-management-with-alternate-credentials-to-retrieve-services.aspx