Harmless PowerShell pranks for coworkers and friends who leave their computers unattended. Everything here is a joke — please keep contributions in that spirit. No malware, no data theft, no persistence beyond what a normal user can clean up in seconds.
| File | What it does |
|---|---|
CatFacts.ps1 |
Payload: ~18.75% of the time it raises the system volume and speaks a random fact from catfact.ninja via Windows speech synthesis. |
Install-CatFacts.ps1 |
One-shot installer. Stages the payload, registers a Scheduled Task on a weekday work-hours schedule, and fires it once to verify. |
Uninstall-CatFacts.ps1 |
Removes the task and the staged payload. Leaves git clones alone. |
Open PowerShell on the target machine and paste:
iex (irm https://raw.githubusercontent.com/TX-RX/OfficePranks/main/Install-CatFacts.ps1)That downloads Install-CatFacts.ps1, which then downloads CatFacts.ps1 into %LOCALAPPDATA%\OfficePranks\, registers a Scheduled Task running every 30 minutes on weekdays 9 AM – 5 PM, and speaks one fact immediately so you know it worked. No administrator privileges required — everything runs in the current user's context.
If you'd rather see what you're running before you run it:
git clone https://github.com/TX-RX/OfficePranks.git
cd OfficePranks
.\Install-CatFacts.ps1When Install-CatFacts.ps1 finds a CatFacts.ps1 next to itself (i.e. you're running it from a clone), it uses that file in place instead of downloading. Edit CatFacts.ps1 first if you want to customize the speech, the volume, or the random gate.
Install-CatFacts.ps1 exposes parameters for tweaking the cadence:
# Every 15 minutes from 8 AM to 6 PM
.\Install-CatFacts.ps1 -StartTime 08:00 -EndTime 18:00 -IntervalMinutes 15
# Use a fork instead of TX-RX/OfficePranks
.\Install-CatFacts.ps1 -SourceUrl 'https://raw.githubusercontent.com/<you>/OfficePranks/main/CatFacts.ps1'
# Skip the verification run at the end (silent install)
.\Install-CatFacts.ps1 -SkipVerifyRunFull parameter list:
| Parameter | Default | Purpose |
|---|---|---|
-TaskName |
OfficePranks-CatFacts |
Scheduled Task name. Change it if you're stacking multiple pranks. |
-SourceUrl |
…/TX-RX/OfficePranks/main/CatFacts.ps1 |
Where to download CatFacts.ps1 when not running from a clone. |
-StartTime |
09:00 |
First fire of the day. |
-EndTime |
17:00 |
Last fire of the day. |
-IntervalMinutes |
30 |
Gap between fires. |
-SkipVerifyRun |
(off) | Don't speak a fact at the end of install. |
CatFacts.ps1 accepts a -Force switch that bypasses the random gate, useful for verifying audio works:
.\CatFacts.ps1 -Forceiex (irm https://raw.githubusercontent.com/TX-RX/OfficePranks/main/Uninstall-CatFacts.ps1).\Uninstall-CatFacts.ps1Unregister-ScheduledTask -TaskName 'OfficePranks-CatFacts' -Confirm:$false
Remove-Item "$env:LOCALAPPDATA\OfficePranks" -Recurse -ForceThe uninstaller is safe to run on a machine that was never installed — it just reports "not found" and exits. It also detects when %LOCALAPPDATA%\OfficePranks is actually a git clone (.git folder present) and leaves the directory intact in that case.
- Random gate. On each run,
CatFacts.ps1rollsGet-Random -Maximum 10000and only proceeds if the result is under1875(~18.75%). With a 30-minute trigger over an 8-hour day that's 16 chances per day, yielding ~3 expected fact deliveries. - Volume. Before speaking, the script sends the volume-down key 50 times to floor the system volume, then volume-up
Ntimes to set a known level (default10, i.e. ~20% on a 50-step scale). This guarantees the fact is audible regardless of what the victim had set, including a muted machine. - Speech. Uses
System.Speech.Synthesis.SpeechSynthesizer— built into Windows, no extra packages required. - Scheduled Task. Registered under the current user with
LogonType InteractiveandRunLevel Limited, weekly trigger on Mon–Fri with sub-trigger repetition everyIntervalMinutesminutes for the durationEndTime - StartTime. No admin elevation, no system-wide changes. - Failure modes. If
catfact.ninjais unreachable, the payload silently returns (try/catch around the API call) and waits for the next tick. If the speech subsystem isn't available, the script errors silently inside the hidden PowerShell window.
- This is intended for personal machines or shared dev boxes among friends. Don't deploy on company-managed devices without checking your acceptable-use policy — a hidden scheduled task that downloads and executes code is the kind of thing modern EDR products will flag, and rightly so.
- The volume override is the rudest part. If you want a kinder version, replace
Set-Speaker -Volume 10inCatFacts.ps1with code that snapshots and restores the prior volume. - All persistence is contained in one Scheduled Task and one folder. Nothing is written to the registry, no services are installed, no startup entries are created.
Pull requests welcome for new pranks in the same spirit:
- Harmless and reversible — your prank must come with a one-step uninstall.
- No exfiltration. No data leaves the victim's machine except for benign public-API calls like catfact.ninja.
- No privilege escalation. Anything that needs admin is out of scope.
- No detection evasion beyond
-WindowStyle Hiddenon the scheduled action. - Include
Install-*.ps1andUninstall-*.ps1scripts for each new payload, and update the README.
MIT.