Just tested it with 8.8.8.8 and works well.
PS C:\WINDOWS\system32> $ips="8.8.8.8";function t($i,$p){try{$c=New-Object System.Net.Sockets.TcpClient;$r=$c.BeginConnect($i,$p,$null,$null);if(-not $r.AsyncWaitHandle.WaitOne(200,$false)){$c.Close();return $false};$c.EndConnect($r);$c.Close();return $true}catch{return $false}};while($true){Write-Host "`n$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')" -ForegroundColor Yellow;$ips|%{$ping=Test-Connection $_ -Count 1 -Quiet;$h=t $_ 443;$s=t $_ 22;Write-Host $_ -ForegroundColor Cyan -NoNewline;Write-Host " | Ping: " -NoNewline;Write-Host $ping -ForegroundColor ($(if($ping){"Green"}else{"Red"})) -NoNewline;Write-Host " | HTTPS: " -NoNewline;Write-Host $h -ForegroundColor ($(if($h){"Green"}else{"Red"})) -NoNewline;Write-Host " | SSH: " -NoNewline;Write-Host $s -ForegroundColor ($(if($s){"Green"}else{"Red"}));};Start-Sleep 5}
2026-01-14 21:04:06
8.8.8.8 | Ping: True | HTTPS: True | SSH: False
2026-01-14 21:04:11
8.8.8.8 | Ping: True | HTTPS: True | SSH: False
2026-01-14 21:04:17
8.8.8.8 | Ping: True | HTTPS: True | SSH: False
2026-01-14 21:04:22
8.8.8.8 | Ping: True | HTTPS: True | SSH: False
2026-01-14 21:04:27
8.8.8.8 | Ping: True | HTTPS: True | SSH: False
PS C:\WINDOWS\system32>
Best,
Andy