Ole Skovgaard, IT-Architect @ Infrahouse, Lersø Parkallé 107 , 2100 København Ø, Denmark

Tuesday, November 22, 2011

Run Programs as Local System Account

By default all Configuration Manager Task sequence steps are running as the local system account therefore it occasionally can be helpful to validate any setup packages or scripts with local system privileges before applying them to any given task sequence.

To accomplish this I prefer using a program named PSEXEC.exe from Sysinternals now owned by Microsoft. In this I open a Command Prompt and from that shell I am able to execute any setup or script file I intend to run.

Quick Step
  1. Download PsTools. (Link)
  2. Run (with elevated rights): psexec -i -s cmd.exe
  3. To ensure that you are running as Local System Account type Whoami in the console
  4. Run your setup or script file that you want to test.
Start CMD with PSExce.exe










WhoamI - from here you can execute any program as Local System.
















NOTE: In Configuration Manager 2007 SP1 and earlier, task sequences always run by using the local system account, so there is no option of running a task sequence for each individual step. In Configuration Manager 2007 R2, the task sequence command-line step can be modified to run as a different account.