Launch a command prompt window using SYSTEM credentials

by Mitch Tulloch [Published on 19 Jan. 2012 / Last Updated on 19 Jan. 2012]

How to launch a command prompt window using SYSTEM credentials.

The built-in special identity NT AUTHORITY\SYSTEM or LocalSystem has a security identifier (SID) of S-1-5-18 and is a highly privileged service account that is used by the Windows operating system. Sometimes you may want to open a command prompt window running under these credentials. For example, System Center Configuration Manager runs packages in the SYSTEM context, so if you are trying to troubleshoot running packages you can do so by running them directly from a command prompt window running in the LocalSystem context.

You may have tried launching cmd.exe in the LocalSystem context by using the AT.exe task scheduling command, but if you've done so you will have discovered that in Windows 7 this doesn't work. Well, it does work actually, but the command prompt window that opens this way will not be displayed on the user's interactive desktop. Instead, it will appear on the session 0 winsta0\default desktop, which is unfortunately not the user's desktop. What's the solution then?

Download Psexec from Windows Sysinternals site and run the following command:

psexec –sid cmd.exe

This will open a new command prompt window, and if you open Task Manager and select the Processes tab and select Show Processes From All Users, you should see a running instance of cmd.exe with SYSTEM displayed as the username.

To download Psexec, go to

Mitch Tulloch is a seven-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization. For more tips by Mitch you can follow him on Twitter or friend him on Facebook.

See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Featured Links