Загрузка данных


& "$env:WINDIR\System32\ping.exe" @pingArgs 2>&1 |
    ForEach-Object {
        if ($_ -match 'Reply from|Request timed out|Destination host unreachable|General failure|Відповідь від|Час очікування відповіді|Заданий вузол недоступний') {
            Write-Output ("{0} {1}" -f (Get-Date -Format 'HH:mm:ss'), $_)
        }
        else {
            Write-Output $_
        }
    }