r/PowerShell • • Dec 12 '25

Execute script 2 as user?

Hello, I'm trying to deploy a software via intunewin. Without getting to much into details I have 2 scripts. First one install the software and the second deploy a profile on that software.

The first needs to be executed as admin but the second needs to be executed as the user running the computer.

If you deploy a intunewin package, you need to specify a command for installation.

powershell script1.ps1

And in the first script, I would do a powershell script2.ps1

Would that work?

5 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/Ath3na- Dec 21 '25 edited Dec 21 '25

would you care to shed a little more info on your above comment?

0

u/PutridLadder9192 Dec 21 '25

This is what I assumed is most people just don't pay attention to security