A Practical Joke

Mon, 10/18/2021 - 14:16

This inspired practical joke was shared by its evil-genius author, Sunsparc, who definitely earns points for creativity. (Just to be clear: We are definitely NOT suggesting you do anything like this to someone you know.) 

"I push a Powershell script to one particular user that fetches a random cat fact from a website then reads it through their computer speakers out loud. They're thoroughly convinced that their boss, a non-IT person, is doing it to them."

Add-Type -AssemblyName System.Speech
$SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$SpeechSynth.SelectVoice("Microsoft Zira Desktop")
$Browser = New-Object System.Net.WebClient
$Browser.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$CatFact = (ConvertFrom-Json (Invoke-WebRequest -Verbose -Uri https://catfact.ninja/fact -UseBasicParsing))
$CatFact.fact
$SpeechSynth.Speak("Did you know ?")
$SpeechSynth.Speak($CatFact.fact)

Provided date
Contributer name
Sunsparc
Tags

Login/Register

You are just few steps away from the exclusive ITPro content, Please sign or register below

Register