Test Your Command-Line Before Pushing a Package!

SCCM installs software using the local system account. This sometimes presents issues when testing before packaging in SCCM, as there is no straight-forward way to run things as this account. Packaging the software, testing by deploying to a test machine, and waiting for the results can be time-consuming, so here’s an alternative method for testing your command-line as the local system account:

1. You should have PsExec on the test machine (for example, my test machine has it located in C:\Program Files (x86)\PsExec.exe). Open an admin command prompt and navigate to the location of your PsExec.

2. Enter psexec -si cmd.exe to open a command prompt as the local system account. To confirm that you’re running this command prompt as the system, you can use the command whoami. It should return nt authority\system.

3. You can now use your command line installation to run under the same conditions as SCCM!

For even more betterness, you can create a desktop shortcut with the following target (be sure to sub in a valid admin username):

C:\Windows\System32\runas.exe /user:[domain]\[admin account] “c:\program files (x86)\psexec -si cmd.exe”

This will prompt for the admin account’s password, and then launch the system command prompt.

-Derived from Richard Balsley’s post, found here

One thought on “Test Your Command-Line Before Pushing a Package!

  1. https://mckinneyuptownapartments.wordpress.com/

    How does one go about finding another apartment in another state that they have never seen before.
    However, if you’re searching for a home for the entire family,
    then not only must you find the perfect location, the apartment features and community amenities will also impact you.
    Home furniture is the true reflection of the taste and style of the person living there.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do some math to prove you\'re a human: * Time limit is exhausted. Please reload the CAPTCHA.