SilverTech Posted March 7, 2007 Report Share Posted March 7, 2007 Hi there! Im on a litle project and need some help. How do i transform values like network speed that are in Bytes in Kbytes My commandline so far looks like this: Get-WmiObject Win32_PerfFormattedData_PerfNet_Redirector | out-gauge -value BytesTotalPersec -float -refresh 0:0:1 -type digitalĀ Link to comment Share on other sites More sharing options...
marco.shaw Posted March 7, 2007 Report Share Posted March 7, 2007 You can do this with a scriptblock: Get-WmiObject Win32_PerfFormattedData_PerfNet_Redirector | out-gauge -value {$_.BytesTotalPersec/1000} -float -refresh 0:0:1 -type digital Link to comment Share on other sites More sharing options...
SilverTech Posted March 7, 2007 Author Report Share Posted March 7, 2007 thx m8. It worked perfectly if anyone else is reading this i also used -ValueFormat "##.00" and devided the value with 1024/1024 to get it in MB Link to comment Share on other sites More sharing options...
marco.shaw Posted March 8, 2007 Report Share Posted March 8, 2007 Oh, and instead of doing "/1024/1024", you can just do "/1mb" with PowerShell. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.