title: Run powershell command as currently logged in user
body: <p>Given a powershell script that runs as Local System (<code>nt authority\system</code>).<br>
  Is there a way to execute a command as the currently logged in user (without specifying the user password of course) ?<br>
  From what I've experimented so far is the <code>Register-ScheduledTask</code> cmdlet which takes an <code>-User</code> param. The task was scheduled and run successfully, but only works when the user is logged in.<br>
  Is there a better way to do it ?</p>