Tuesday, August 18, 2015

PowerShell Prank

The next time a coworker leaves their computer unlocked with a PowerShell ISE window open, and you need to teach them a lesson about security (or you're kind of a jerk), here's a fun PowerShell prank.

1.  Click on File, New PowerShell Tab.

2.  Copy and paste this at the command prompt and hit enter:

001
clsWhile ( $True ) { $PSise.Options.Zoom = 100 + 10 * [math]::sin( (Get-Date).TimeOfDay.TotalSeconds ); Sleep -Milliseconds 40 }

3.  Switch back to the PowerShell tab they were working on.

You can try it on your own computer to see what it does.  It's harmless.  Close the PowerShell tab it's running in to stop it.

I adapted this from information in a PowerShell.com Tip of the Day.

1 comment: