$adapters = Get-CimInstance -ClassName Win32_PerfFormattedData_Tcpip_NetworkInterface |
    Where-Object { $_.BytesTotalPersec -gt 0 } |
    Select-Object -First 1

if ($adapters) {
    $sent     = [math]::Round($adapters.BytesSentPersec     / 1KB, 2)
    $received = [math]::Round($adapters.BytesReceivedPersec / 1KB, 2)
    Write-Output "$sent $received"
} else {
    Write-Output "0 0"
}