So, I like my monitors to do more then just blink.  Also, its good for people to come by and see something happening in IT, as most of the stuff we do is invisible.  I started out this script so I could do functions on ranges of IP’s, and it turned into this fun little script that just scrolls infinitely IP’s and some random phrases in color.  If you pay attention, you can see it actually took a lot of basic stuff; WHILE loops, IF commands, random selection, write output, colors, variables, logic and more.  You can kinda work out some other problems just by seeing how this little fun guy runs.   Please send me a comment if you like it, everyone like positive reinforcement 🙂

=======================

Powershell fun script loop scan

echo off
Do {
For ($A=5; $A -le 252; $A++) {
    For ($B=5; $B -le 252; $B++) {
        For ($C=5; $C -le 252; $C++) {
    $color1 = (“DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Blue”,”DarkBlue”,”DarkGreen”,”Red” | Get-Random)
    Write-Host -Foreground $color1 “192.$A.$B.$C   ” -nonewline
    $lop1 = (“red MONITORING DETECTED-FAILING OVER TO EXECUTION GAMMA— “,”Green Action has not received any errors.   “, “DarkGreen Montioring Complete.  ” ,”Yellow Receiving user data stream, encrypting.  “,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white”,”white”,”black”,”white” | Get-Random)
                    Invoke-Expression “write-host -Foreground $lop1 -nonewline”
    Start-Sleep -Milliseconds 100
}
}
}
} while (0 -ne 1)

Leave Your Comment

Your email address will not be published. Required fields are marked *

ten − 4 =