I have a PowerShell script that works perfectly when a user logs into the system. However, I want it to execute when the user unlocks the PC as well. I've tried setting this up in Task Scheduler, and while I can see that PowerShell activates, the actual script isn't running. What am I doing wrong?
3 Answers
Could you share the setup for your scheduled task? It might help troubleshoot the issue.
Make sure you're creating a regular task instead of a basic one. Set the trigger to "On workstation unlock" to get it to work when you unlock your PC.
I once made a similar task triggered by specific event viewer events. It could be worth looking into that approach.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures