COM组件
IE:
$ie = New-Object -ComObject InternetExplorer.Application
Excel:
$excel=new-object -comobject excel.application
Word:
$wordApp = New-Object -COM Word.Application
$file = (dir Sample.doc).FullName
$doc = $wordApp.Documents.Open($file)
$text = $doc.Content.Text
$text
$wordApp.Exit
Perfcounter:
$counter = New-Object Diagnostics.PerformanceCounter