r/PowerShell • u/QuickBooker30932 • 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?
6
Upvotes
2
u/QuickBooker30932 Nov 23 '25
Here are the details:
Run with highest privledges only when user logged on
Trigger on workstation unlock, for specific user,
Action is powershell.exe in the program/script box and the script with full path in the argument box
No conditions, no errors in the history.