0

I have a PowerShell script (package) which need to run with the logged in domain user account in order to get a file from intranet site. It should be silent installation without any user intervention By default, SCCM launching the script in system context but I want to change it to user context.

Thank you in advance.

Rhonelaan 30
  • 1
  • 1
  • 2

1 Answers1

1

A how-to is described in this question In what context do SCCM Powershell detection scripts run in?

Basically create a Deployment and define the command line as powershell running your script from a share or scriptblock. Target the User with the deployment and specify it only runs when the user is logged in and it should execute in the User context.

The linked question provides a much better write-up

Garrett
  • 1,598
  • 4
  • 14
  • 25
  • 1
    You can deploy to a machine and still run with user credentials if you want, deploying to a user would mean it runs on every machine the user logs into deploying to a machine but running with user would mean it runs for every user that logs into that computer. – Syberdoor Sep 16 '20 at 10:37
  • Oh cool, submit an answer here and I'll upvote yours and remove mine :) – Garrett Sep 16 '20 at 22:53
  • Your answer is perfectly fine (especially considering we don't even know what their scenario is), just a little added info to help them decide – Syberdoor Sep 17 '20 at 12:04