Skip to content

Instantly share code, notes, and snippets.

@mpslanker
Created April 23, 2014 14:46
Show Gist options
  • Save mpslanker/11218221 to your computer and use it in GitHub Desktop.
Save mpslanker/11218221 to your computer and use it in GitHub Desktop.
# Use this command as a shortcut to launch powershell as a different user but still elevated if UAC is on.
# If you would like the shortcut to have the powershell logo, you can set it by changind the icon and point at:
# %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe
C:\Windows\System32\runas.exe /savecred /env /noprofile /user:[domain]\[username] "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -command \"start-process powershell -verb RunAs\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment