title: How to run scheduled Coded UI Tests on Virtual Machine without having a RDP connection
body: <p>Situation in short:</p>
  
  <ul>
  <li>Virtual Machine with Visual Studio 2013 installed. PowerShell script
  runs on the VM to execute Get Latest, Build and Execute Coded UI
  Tests. Windows Scheduled Task to execute PowerShell nightly.   </li>
  <li>auto-logon is enabled (or I'm doing something wrong?) </li>
  <li>yes, I've read post <a href="https://stackoverflow.com/questions/11744526/is-it-possible-to-run-coded-ui-tests-without-having-to-connect-via-remote-deskto">Is it possible to run Coded UI tests without having to connect via remote desktop?</a></li>
  <li>I've seen posts about TCM. Does this help and how can I use it in my
  situation?</li>
  </ul>
  
  <hr>
  
  <p>I made some tests in Microsoft Test Manager and I also executed and recorded them.
  I've loaded these tests in a test project (and changed the script providing categories and custom checks).
  I then categorized these (as Development or Acceptance).
  I executed out using a PowerShell script on a VM (with Visual Studio 2013 installed) with following actions:</p>
  
  <ul>
  <li>Get Latest</li>
  <li>Build</li>
  <li>Run latest build with a selected set aka category using mstest.exe</li>
  </ul>
  
  <p>So far everything is going perfectly. All the tests pass.
  However, when I create a Scheduled Task on my VM run the PowerShell script everything fails because of a missing session.
  Do I have the VM (I have no knowledge of Virtual Machines) then unlock or something?</p>
  
  <p>Side-Note:
  I also tried to fix this with a Test Agent and Controller, but once I had installed these, all other users of TFS lost their rights, so I prefer not to do this again.</p>
  
  <p>I would be very grateful if you know something that can solve this.
  I spent hours on Google finding a solution for this issue, but no solution helped me.</p>
  
  <p>Do I need to provide more information?</p>