Just what the title says...
while ($true) {if ((invoke-webrequest https://redacted.com -usebasicparsing).content | out-string | %{$_ -like '*Log in to your account*'}) {get-date; write-host "OK -- redacted.com contains logon string"} else {send-mailmessage -from redacted+221BBakerStreet@gmail.com -to redacted@gmail.com -subject "Check the AWS VPN" -smtpServer "smtp.charter.net" -port 587}; sleep 300}
Comments
Post a Comment