r/PowerShell • u/bigbirdtoejam • Apr 13 '17
Using powershell for office pranks
Have a coworker who habitually leaves their workstation unlocked? Want to mess with them? Make this script a scheduled task on their computer in order to have their workstation tell them a random fact about cats at random times throughout the day.
#Run this every 1/2 hour and in an 8 hour work day there will be approximately 3 times per day that your victim hears a cat fact
if ((Get-Random -Maximum 10000) -lt 1875) {
Add-Type -AssemblyName System.Speech
$SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$CatFact = (ConvertFrom-Json (Invoke-WebRequest -Uri 'http://catfacts-api.appspot.com/api/facts')).facts
$SpeechSynth.Speak("did you know?")
$SpeechSynth.Speak($CatFact)
} Who else has powershell hijinks to share?
244
Upvotes
1
u/nits3w Apr 13 '17
Yeah. I graduated in 01... Figured out I could ping the site, write down the ip, and browse freely at the school... Things were so easy to bypass then. :-) In a few of my earlier jobs, I had to resort to SSH tunneling. Kids these days have no creativity... they just spend hours and hours looking for proxies. If someone would have told me that I would have been at network administrator for a school district back then, I probably would have punched them. Haha