title: How to script log in and log out on windows xp
body: <p>I've found several posts on this site and the internet describing how to log out the current user, but how can I log in a specific user?</p>
  
  <p>Log out (cygwin) can be accomplished this way:</p>
  
  <pre><code>echo "\n" | powershell -ExecutionPolicy RemoteSigned "(gwmi Win32_OperatingSystem).Win32Shutdown(0)"
  </code></pre>