Saturday, July 19, 2014

Start Windows commands w/ admin privileges without a password

First start any command with runas and admin privileges

runas /savecred /user:<user w/admin privs>  <command to run>

E.g. 
runas /savecred /user:root cmd.exe 

It will prompt for a password so enter it, yet after that the credentials are saved so any command can be run without entering a password:

runas /savecred /user:root taskkill /f /im cmd.exe /t

no password necessary!

No comments:

Post a Comment