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.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see .

Latest Contributions

Featured Links