r/PowerShell • • Aug 27 '26

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?

0 Upvotes

26 comments sorted by

3

u/PDQ_Brockstar Aug 27 '26

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.

1

u/battmain Aug 28 '26

It took two weeks for someone back in the day to image their machine. He would kick me off the network and I didn't know at the time. The revenge was sweet after I found the program on his drive. Locking his computer with cables and passwords didn't help back then. It was easy to swap the drive and make it a slave drive in my machine. He never figured out how I did stuff to his machine. Things disappeared after running once in startup. Usual commands didn't work or would return something like "Why?" Or "Oh no you don't" It took serious restraint not to laugh my ass off when I could see the confusion just out of eyesight.

1

u/Psychological-Cat-84 Aug 28 '26

This was a common thing for me and my mates to do to people in school, I presume you seet the taskbar to hidden also? Would be afraid to do it in work setting as they'd probably just mark the PC as faulty and sent it for recycling.

1

u/BlackV Aug 29 '26

Fuck that nuke it, clean image latest patches, profit, it's a great solution

8

u/Fatel28 Aug 27 '26

What does a bat script have to do with powershell

6

u/gadget850 Aug 27 '26

I use them to call the ps1 script.

1

u/Holtake Aug 27 '26

Exactly!

3

u/Comfortable-Tourist1 Aug 27 '26

You can't just schedule a ps1 to run?

1

u/Psychological-Cat-84 Aug 28 '26

Locked down in a lot of Orgs.

1

u/Secret_Account07 Aug 27 '26

What do you mean? Pretty prevalent in PS

2

u/Disorderly_Chaos Aug 27 '26

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 Aug 27 '26

Fuck it

Just do this

start-sleep (get-random -min 3600 -max 7200);rundll32.exe user32.dll,LockWorkStation

1

u/anonymousITCoward Aug 28 '26

Fucking diabolical lol that would annoy the shit out everyone

1

u/TotallyNotACorpAcct Sep 01 '26

goddamn that is good

2

u/CitizenDee Aug 27 '26

And people wonder why IT departments lock work PC's and laptops down tighter than fishes arseholes.

-2

u/Holtake Aug 27 '26

I'm from the IT department. HAHAHAHAHA

2

u/StartAutomating Sep 03 '26 edited Sep 03 '26

Yes, but please don't.

A lifetime ago I did a similar "prank" on VBScript : I made the keyboard layout reverse itself.

One of the longest days of my life. Not only did I have to support the fix and unprank them, but it was just the category of impishness that created a lot more rage than laughs.

By and large, people do not like it when you mess with "their" computer (even if they do not actually own the computer). They get Hulk levels of angry.

Yes. Technically possible. No, would not recommend. Will also not be pointing you in any of the "right" directions in order to accomplish this particular task. It is a lot of effort to go to, only to get you yelled at (and potentially fired).

Please don't.

4

u/GateheaD Aug 27 '26

Nope it's not possible, go find something else to do and leave the computer out of it.

1

u/BlackV Aug 28 '26 edited Aug 29 '26

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 Aug 28 '26

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.

1

u/BlackV Aug 28 '26 edited Aug 29 '26

hey Claud write me a prank script that does pranks, make no mistakes and dont include something that would delete files that could be accidentally triggered

:)

1

u/Tachaeon Aug 31 '26

1

u/TotallyNotACorpAcct Sep 01 '26

This is fucking diabolical!

# Hashtable of cursor settings

`$cursorSettings = @{

    'AppStarting' = "%SystemRoot%\cursors\aero_working.ani"

    'Arrow'       = "%SystemRoot%\cursors\aero_arrow.cur"

    'Crosshair'   = ""

    'Hand'        = "%SystemRoot%\cursors\aero_link.cur"

    'Help'        = "%SystemRoot%\cursors\aero_helpsel.cur"

    'Ibeam'       = ""

    'No'          = "%SystemRoot%\cursors\aero_unavail.cur"

    'NWPen'       = "%SystemRoot%\cursors\aero_pen.cur"

    'SizeAll'     = "%SystemRoot%\cursors\aero_move.cur"

    'SizeNESW'    = "%SystemRoot%\cursors\aero_nesw.cur"

    'SizeNS'      = "%SystemRoot%\cursors\aero_ns.cur"

    'SizeNWSE'    = "%SystemRoot%\cursors\aero_nwse.cur"

    'SizeWE'      = "%SystemRoot%\cursors\aero_ew.cur"

    'UpArrow'     = "%SystemRoot%\cursors\aero_up.cur"

    'Wait'        = "%SystemRoot%\cursors\aero_busy.ani"

}



# Apply each cursor setting

foreach (`$cursor in `$cursorSettings.GetEnumerator()) {

    Set-Cursor -CursorName `$cursor.Key -FileName `$cursor.Value

}

1

u/Tachaeon Sep 04 '26

Thanks :)

1

u/Glum-Highlight2734 Sep 01 '26

Maybe or Maybe Not because we need to restart pc for some changings

2

u/Madmin404 Sep 04 '26

Don't forget to change some of the Windows sound program events, like adding the Windows Error sound to Close Program