#计算文字行数
Select-String -Pattern "iis" -Path .\Midversion_serverresult.txt |measure -Line
(Select-String -Pattern "iis" -Path .\Midversion_serverresult.txt).count
#计算文字个数、行数、
Get-Content *.txt | Measure-Object –word –line -character
原文:http://www.cnblogs.com/dreamer-fish/p/3554433.html