次の方法で共有


How do I run Powershell.exe/command prompt as the LocalSystem Account on Windows 7?

Every once in a while I will need to troubleshoot something with the LocalSystem Account. Using the Runas.exe command with “Nt Authority\System” doesn’t work; I’m left trying to supply a password. I don’t remember if it ever worked in WS2003.

C:\>runas /user:"Nt Authority\System" cmd.exe

Enter the password for Nt Authority\System:

RUNAS ERROR: Unable to acquire user password

There were a few ways to do this in the older Operating Systems. The two I used to use were creating a scheduled task to run cmd.exe using the LocalSystem account and creating a Service to do the same thing. However on Windows 7 these didn’t work for me. I tried a bunch of different ways but the way that worked the best was to launch Powershell.exe using PSExec.exe.

C:\>psexec -i -s Powershell.exe

PsExec v1.97 - Execute processes remotelyCopyright (C) 2001-2009 Mark RussinovichSysinternals - www.sysinternals.com

This will launch a new window.

PS C:\Windows\system32> whoamint authority\system

Comments

  • Anonymous
    February 11, 2015
    The comment has been removed
  • Anonymous
    April 13, 2015
    nice, helps a lot, thanks
  • Anonymous
    August 07, 2015
    The comment has been removed
  • Anonymous
    October 21, 2015
    The comment has been removed
  • Anonymous
    December 11, 2015
    The comment has been removed