PowerShell – very simple for loop that takes a less than count, sending text to screen

Powershell :  write-output and pipe | it to a file similar to

| Out-File $pathName + “SomeFile.txt”) .

######################################
#Author: www.BrilliantlyEasy.com"
#Send some text to screen and Make it color
#Print out accounts for users
##################################################
## For loop does for count from 300-401
For ($i=300; $i -lt 401; ){

$a= $i++

#COLOR MAKER: -foregroundcolor red -backgroundcolor yellow
write-host "Site Name" -foregroundcolor red -backgroundcolor yellow
#notice $a and the `b -`b moves back one char.
write-host "http://www.BrilliantlyEasy.com"`b$a
###############################notice $a
write-host "UserLogin: easy\user"`b$a
write-host "UserName: user"`b$a
write-host " "

}

share with friends

Share to Google Buzz
Share to Google Plus
Share to LiveJournal
Share to Odnoklassniki
No comments yet.

Leave a Reply