I am facing a peculiar setup, where I need to use local administrator on a windows machine. The instructions are as follows:
- Shift-right-click the
cmd
or Powershell shortcut - Select "Run as Administrator"
- In the resulting UAC screen, authenticate as a domain user different from the current user. The domain user name is difficult to remember, so we have to keep it on postit notes.
- Do your thing
I'd like to be able to skip step 1, and ideally perform the auth on the command line (avoiding the UAC).
My ideal flow would be:
- Open Powershell or Cmd console
- Type a privileged command, including the privileged domain nalme
- Type the password on the same console (without the domain user)
- Do your thing
Based on some searching, I've tried runas /netonly
, but it is not the same.