|
|
|
|
|
by centur
633 days ago
|
|
Back in windows and powershell days, this was my favorite "security reminder" prank. Everyone who forgot to lock their machine and walked away got this script executed on their machines.
TLDR: it schedules a task "Security Reminder" to play "I'm watching you" via voice synth, every 30 mins. ``` $action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument '-NoProfile -WindowStyle Hidden -command "& {[System.Reflection.Assembly]::LoadWithPartialName(""System.Speech"") | Out-Null; (New-Object (""System.Speech.Synthesis.SpeechSynthesizer"")).Speak(""I''m watching you"")}"' $period = New-TimeSpan -Minutes 30; $trigger = New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Minutes 30) -RepetitionDuration (New-TimeSpan -Days 1024) -At 9am -Once Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "Security reminder" -Description "Security Reminder" ``` You can imagine people faces, especially many were sitting in headphones in open space offices. Those were the days... |
|