How to open a command prompt running as the Microsoft "Local System" account

Version 19

    Verified Product Versions

    Endpoint Manager 9.6Endpoint Manager 2016.xEndpoint Manager 2017.x



    There are multiple ways to open a command prompt running as the Local System account.  Here are some easy ways to do this:


    Note: All commands should be run from an administrative elevated command prompt (CMD running as administrator


    • Download a Sysinternals tool called PSexec. This tool can also be used to launch other programs or scripts as the local system (regedit.exe!).  Run:

      psexec -i -s cmd.exe



    • On an Ivanti EPM agent, run the following command from a command prompt as a local administrator:

      "c:\program files\landesk\ldclient\localsch.exe" /exe=cmd.exe


    • On a workstation without a n Ivanti EPM agent, use Microsoft's Scheduler service by running the following command at the command prompt. Note: Determine the current system time and replace the time in the example below with the current time on your system plus 1 or 2 minute(s).  For example, the command for 2:23 PM would be this:

    at 14:23 /interactive cmd.exe


    • When remote controlling an Ivanti EPM agent, in the top of the screen there is a Run: field.  Simply type "cmd.exe" in the Run:  field and click the green arrow.

    Note: This doesn't work with the Management Gateway on-demand agent, because the user launches the on-demand agent.  It only works with the agent service.


    • Download the attached script to the scripts directory on your Core Server.  Schedule the attached script as a scheduled task from the Console.  It will open a Local System command prompt on the target workstation. 
      Local System Command Prompt.ini