title: Best method using TeamCity for stopping and restarting services on remote hosts?
body: <p>OK, I can't fully decide if this is better asked on ServerFault or SO, but I think this is more of a programming question at heart...(you may disagree)</p>
  
  <p>I'm trying to wrap up all sorts of deployment activities into a single console application, then execute it with appropriate parameters with the TeamCity build Command Line runner.  However, attempting to stop/start/install Windows services on a remote machine seems to be a tricky business using ServiceController from a process that can't run with elevated permissions.</p>
  
  <p>At this point, it might actually be the easiest method to execute Powershell scripts using Invoke-Command on each remote host. (of course, allowing this is a <em>different</em> security hole) than disabling UAC or other options...</p>
  
  <p>Would anyone care to venture an opinion of what methodology would be the best way to proceed?</p>