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))
$SpeechSynth.Speak("Did you know ?")

Provided date
Contributer name


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