Home Tip of the day - Powershell for April first. Tricks and pranks part 1
Post
Cancel

Tip of the day - Powershell for April first. Tricks and pranks part 1

Tip of the day: Aprils Fools’ Day pranks with Powershell Part 1

Apply these pranks to your colleagues’ computers. They will be surprised and will have a good laugh.

Note: These pranks are harmless and will not cause any damage to the computer. They are just for fun.

Note: If you have any other ideas for pranks, please share them in the comments.

Most useful commands

Self destruct the computer:

1
Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak("A critical system error has occurred, the computer will self destruct in 20 . 19 . 18 . 17 . 16 . 15 . 10 . 9 . 8 . 7 . 6 . 5 . 4 . 3 . 2 . 1 . 0 . 0 . 0 .  This has been a test of the Windows Emergency Alert System");

Help message:

1
2
3
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$speak.Speak('Come see the violence inherent in the system. Help! Help! Im being repressed!')

Set mouse sensitivity to 200:

1
   set-itemProperty 'HKCU:\Control Panel\Mouse' -name MouseSensitivity -value 200

Change the wallpaper to a funny meme or a picture of a colleague’s pet:

1
    Set-ItemProperty -path 'HKCU:\Control Panel\Desktop' -name wallpaper -value 'C:\path\to\image.jpg'

Play a funny sound effect when a colleague opens a program:

1
2
3
4
5
6
   Add-Type -AssemblyName PresentationCore
  $player = New-Object System.Windows.Media.MediaPlayer
  $player.Open('C:\path\to\funny-sound-effect.wav')
  Start-Sleep -Seconds 2
  $player.Play()

Change the font style and size of a colleague’s text editor:

1
2
3
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Notepad" -Name "lfFaceName" -Value "Comic Sans MS"
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Notepad" -Name "lfHeight" -Value "20"

Add a funny message to the Windows lock screen:

1
2
3
4
    $lockScreenMessage = "Don't worry, I won't tell anyone about your secret love for pineapple pizza!"
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "legalnoticecaption" -Value "April Fools' Day"
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "legalnoticetext" -Value $lockScreenMessage

Play imperial march:

[console]::beep(440,500)      
[console]::beep(440,500)
[console]::beep(440,500)       
[console]::beep(349,350)       
[console]::beep(523,150)       
[console]::beep(440,500)       
[console]::beep(349,350)       
[console]::beep(523,150)       
[console]::beep(440,1000)
[console]::beep(659,500)       
[console]::beep(659,500)       
[console]::beep(659,500)       
[console]::beep(698,350)       
[console]::beep(523,150)       
[console]::beep(415,500)       
[console]::beep(349,350)       
[console]::beep(523,150)       
[console]::beep(440,1000)
This post is licensed under CC BY 4.0 by the author.

Tip of the day - Submitting code to open source github project

SharingIsCaring. Export User Profiles to csv