I am looking to create my first SAM Template, using Powershell.
The command I am looking at using is (Get-NetTCPConnection -state timewait).count
wanting to return warning if the value is above 100
wanting to return critical if the value is above 200
$Status = (Get-NetTCPConnection -state timewait).count
IF ($Status < 100){
Write-host "Message: Good";
write-host "Statistic: 0";
Exit 0;
}
ELSE{
write-host "Message: High";
write-host "Statistic: 1";
Exit 1;
}