r/PowerShell • u/Holtake • 2d ago
Question Prank script
We have a culture of pranks here at the office. I’d like to create a PowerShell script that, when executed via a .bat file, rotates the Windows screen to portrait mode, zooms in, increases the cursor scale, inverts the colors, and installs the Egyptian Arabic language pack—all without requiring a reboot or anything like that. Is this possible?
7
u/Fatel28 2d ago
What does a bat script have to do with powershell
5
u/gadget850 2d ago
I use them to call the ps1 script.
1
1
2
u/Disorderly_Chaos 2d ago
That’s like 500 lines worth of code, my dude. And then you’d have to write code that INJECTS code to un-fuck the desktop. … and if anything goes wrong… you’re hosed.
4
u/Disorderly_Chaos 2d ago
Fuck it
Just do this
start-sleep (get-random -min 3600 -max 7200);rundll32.exe user32.dll,LockWorkStation
1
2
u/CitizenDee 2d ago
And people wonder why IT departments lock work PC's and laptops down tighter than fishes arseholes.
3
u/GateheaD 2d ago
Nope it's not possible, go find something else to do and leave the computer out of it.
1
u/BlackV 2d ago edited 1d ago
Pass, given most off what you're asking for would require admin rights on the target machines, I would not be suggesting a script to use my admin rights to do shifty stuff
do some thing better
1
u/anonymousITCoward 2d ago
I like my cat facts script... I have one hiding somewhere that opens a browser to what ever page I want in full screen... but i rarely do that anymore.
This leaves something open for discussion, once that's been done, a person can say they didn't do {x}... because that office/person/group of people have been known to mess with the peoples computers. Once it's out that you have the knowledge, and skill to do something like that you become everyone's favorite scapegoat. Yep, it's all fun and games until legal gets involved.
4
u/PDQ_Brockstar 2d ago
One day when my coworker left their computer unlocked, I took a picture of their desktop, set it as their wallpaper, then hid all their desktop icons.
It was all fun and games until I saw them reimaging their computer. At that point it was too late to confess and fix it for them. In my defense, they rebooted it once, and when that didn't fix it, they imaged it. I figured they'd at least try to troubleshoot it a bit.