Çok teşekkür ederim desteğiniz için, bunu stat.ps1 adında bir dosya içine kaydettim çalıştırdım fakat bir sonuç vermedi,
Out-null kısmından dolayı mı acaba, gt değerini 1 yapsamda boş dönüyor.
teşekkürler
selam, powershell için şunu deneyebilirsin.
$netstatOutput = netstat -an | Select-String "TCP"
$ipConnections = @()
foreach ($line in $netstatOutput) {
if ($line -match "\s+(\d+\.\d+\.\d+\.\d+):\d+\s+") {
$ipConnections += $matches[1]
}
}
$groupedIPs = $ipConnections | Group-Object | Where-Object { $_.Count -gt 100 } | Sort-Object Count -Descending | Select-Object Count, Name
$groupedIPs