Deploying powershell Script as software package using SCCM to change HKCU registries.

Garima Das 1,061 Reputation points
2022-09-12T04:08:19.243+00:00

Hi experts,

I have created a script that creates a temporary registry in the HKCU. Running the script manually on a system works fine, but when I try deploying the Script as a software package through SCCM, the package deployment shows successful, but the script doesn't work as expected.

Not sure what is going wrong here. I run the package using administrative rights, whether or not a user is logged in.

I have checked execmgr logs but there are no errors.

Could anyone advise what can be the reason?

Microsoft Configuration Manager
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Garth 5,801 Reputation points
    2022-09-12T05:33:04.967+00:00

    If you look you will see that the script is running fine and setting reg keys for the local system account, which is the user running the the script.

    You will need to change the program to run as the user. This should fix the problem.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.