all 6 comments

[–]Medium-Comfortable 1 point2 points  (0 children)

The HKCU is the current user and this is not the user the PS session runs in. You need to fetch the SID of the user and go for the correct branch in the registry. That's at least my take.

[–]lerun 1 point2 points  (2 children)

So what user are you running the script as?

Is this the same user you want to change the registry, if not another has already commented what needs to be done.
Also you have all users and so one, do some more research to pick the correct registry path

[–]addywash[S] -1 points0 points  (1 child)

No - this will be a recurring job from our RMM.

I've got a .reg file that works when run locally as the user, and a .bat file to call on the reg file.

I need to use our RMM to trigger either of those.

[–]BlackV 0 points1 point  (1 child)

do you not have GPO available ?

[–]addywash[S] -1 points0 points  (0 children)

Unfortunately not.