Users Online
· Guests Online: 29
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
Forum Threads
Newest Threads
No Threads created
Hottest Threads
No Threads created
Latest Articles
Articles Hierarchy
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.