示例1: 解析netstat -ant结果为对象
1 |
netstat -ant|select -Skip 2|foreach -Begin {[string]::join(",", @("proto","rq","sq","local","remote","stats"))} {$_ -replace "\s+",","}|ConvertFrom-Csv |
DevOps
示例1: 解析netstat -ant结果为对象
1 |
netstat -ant|select -Skip 2|foreach -Begin {[string]::join(",", @("proto","rq","sq","local","remote","stats"))} {$_ -replace "\s+",","}|ConvertFrom-Csv |