Where can I find all of the COM objects that can be created in Powershell?

John Channing picture John Channing · Mar 18, 2009 · Viewed 39.1k times · Source

In Powershell I can create COM objects which can be used, for example, to control Microsoft Office applications:

$excel = New-Object -com "Excel.Application"
$excel.visible = $true

How can I list all of the available COM objects that can be created in Powershell?

Answer

Jeff Atwood picture Jeff Atwood · Mar 18, 2009

I found this powershell one-liner script that supposedly lists all COM objects.

gci HKLM:\Software\Classes -ea 0| ? {$_.PSChildName -match '^\w+\.\w+$' -and
(gp "$($_.PSPath)\CLSID" -ea 0)} | ft PSChildName

let us know if it works!