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

posted on 2013-06-09 15:12  momingliu11  阅读(201)  评论(0编辑  收藏  举报