r/PowerShell • • Nov 23 '25

Run script when PC unlocked

I have a script that already runs properly when a user logs in, but I'd like it to run when when the user unlocks the PC too. I tried creating a task in Task Scheduler, and I can see PowerShell running, but the script doesn't run. What am I doing wrong?

7 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/QuickBooker30932 Nov 25 '25

It does need a local assets. Adding that to the "start in" field did the trick. Thanks

1

u/lan-shark Nov 25 '25

Great, glad you got it working!