Users Online

· Guests Online: 29

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Ping Status Script

Ping Status Script

 

 

$ServerName = get-content "Provide list of servers in .txt format"
$smtp = "Provide SMTP IP"
$to = "To Address"
$from = "From Address"
$sub = " Server Status"
$body = @"
"@
foreach ($Server in $ServerName) {

                    if (test-Connection -ComputerName $Server -Count 4 -Quiet ) { 

                        $body += write-output "$Server is alive and Pinging `n" 

 

                            } else { $body += Write-output "$Server seems dead not pinging `n" }    
        

}
$body
send-MailMessage -SmtpServer $smtp -To $to -Subject $sub -Body $body  -From $from 


Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.97 seconds
10,799,856 unique visits