PowerShell Paul Fulbright PowerShell Paul Fulbright

PowerShell: I'm Going To Replace You With A Script.

We've all said it, some of us have gone to great lengths to actually DO it.

[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
[int]$target = 60
[int]$i = 1
while($i -lt $target){
    $randx = Get-Random -Minimum 1 -Maximum $screen.Width
    $randy = Get-Random -Minimum 1 -Maximum $screen.Height
    [Windows.Forms.Cursor]::Position = "$($randx), $($randy)"
	$i++
	Start-Sleep -Seconds 10
}

Initial testing indicates this would replace approx. 80% of corporate IT. Welcome your new overlords.

Well, I supposed you'd need to up the duration...

 

Read More