Hello,
I am trying to monitor the bandwidth via powershell script for that so far I have written this script to fetch the bandwidth but I have some confusions,
$query = "Select BytesTotalPersec from Win32_PerfFormattedData_Tcpip_NetworkInterface where name='Microsoft Hyper-V Network Adapter'"
Get-WmiObject -Query $query;
Output :
__GENUS : 2
__CLASS : Win32_PerfFormattedData_Tcpip_NetworkInterface
__SUPERCLASS :
__DYNASTY :
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
BytesTotalPersec : 122118
PSComputerName :
Now I have three questions :
1) What will be the formula to convert the BytesTotalPerSec to MB/s ?
2) Is the BytesTotalPerSec really the bandwidth utilized by the adaptor?
3) If I want to store BytesTotalPerSec value in the variable what would be the procedure.?
Thanks
Frank