runas
Run a program as another user. More information: https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11).
- Run a program as the Administrator local user:
runas /user:.\Administrator ""
- Run a program as a specific user:
runas /user: ""
- Run a program without loading the user's profile:
runas /noprofile /user: ""
- Open Command Prompt as another user:
runas /user: cmd
- Run Notepad as a specific user with the current user's environment variables, opening a file with escaped quotes:
runas /env /user: "notepad \"\""
- Run Active Directory Users and Computers as a specific user:
runas /env /user: "mmc %windir%\system32\dsa.msc"
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
