$CMD = "$PSScriptRoot\SPEEDTEST-64.EXE "
$Date = Get-Date
$Name = $Date.ToString('yyyy-MM-dd-hh-mm')
$Destination = New-Item -Path $PSScriptRoot\$Name.txt -ItemType file -Force
Add-Content -path $PSScriptRoot\$Name.txt -value "ServerID;TargetServer;Ping ms;Download kbps;Upload kbps" Add-Content -path $PSScriptRoot\$Name.txt -value "ServerID;TargetServer;Ping ms;Download kbps;Upload kbps"
cmd /c $CMD -s 5316 -r -rc=";"|out-file $Destination
输出结果如下:
ServerID;TargetServer;Ping ms;Download kbps;Upload kbps
5 3 1 6 ; C h i n a T e l e c o m J i a n g S u B r a n c h ( N a n j i n g , C h i n a ) ; 1 2 . 6 7 ; 5 3 6 1 ; 1 0 3 8
1 1 0 5 ; S o l N e t ( S o l o t h u r n , S w i t z e r l a n d ) ; 1 2 . 3 3 ; 4 3 9 3 ; 2 1 0
阅读(2990) | 评论(0) | 转发(0) |