![]() So let's break it down a bit to see what it does: # Set current time in a variable That PS script seems like a lot packed into a single line, but that's just so we can paste it in that "arguments" diaglog in the Action. Add an Action with Program=Powershell and Arguments= $time=(Get-Date).TimeOfDay.Hours if($time -gt 8 -and $time -lt 19).Add one trigger for "On workstation unlock"."Run with highest priviledges" just to be sure nothing interrupts it (optional) "Do not Store Password" check since it's an offline script "Run whether user is logged in or not" is required so that a powershell window doesn't flash every time this runs. Open Task Scheduler and create a new task with the following settings: ![]() It can be a bit tricky to pull off seamesly, but it can be done with the following steps: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |