Newbie Need some guidance

Hi there , forgive me firstly … i’m no great scripting genius but this toolkit seems to be the one thing that might save a lot of problems for me.

Im trying to run a powershell script locally on a sccm deployment that basically runs the powershell script as the logged in user as it needs to apply a licence to an app after it installs.

I have the task sequence running fine for installing the app , downloading the content but the script will only run for system and i’m starting to make a dent in the wall where i’m banging my head on !!

How do i use this tool , do i have to download something to the client locally in order for the app toolkit to do its things?

Thanks in advance from a embarrassed sys admin :frowning:

Apps in sccm can be set to run under System or the user, BUT the toolkit supports running apps under user when running under System also.

Execute-Process runs something under current user, Execute-ProcessAsUser runs something under a different user

Yes I know APPS can but if i have a task sequence wanting to run a powershell script it will always run as SYSTEM

SCCM Task Sequences do not run-in user context and do not support that when running a package from a task sequence that is set to use user context, I know I have tried. Future versions of SCCM may add that functionality, but to my knowledge SCCM Current Branch up to and including 2010, do not support user context in a task sequence. It does not work. What may work is to use a package with run a package first option. The first run package will be the part that runs as a system package, the calling package can be the one that runs as the user. The one caveat here is that you must set the program package to run “when a user is logged on” as then and only then do you have “user context”