Listing all the COM automation PROGIDs

Listing all the COM automation PROGIDs

  • Comments 4

<edited 7/2/2006 to add categories and PSMDTAGs>

Windows PowerShell allows you to program against COM automation.  The typical way to do this is :

$x = new-ojbect -ComObject <PROGID>

The question then is, how do I know what progids I can use.  Here are there 3 answers

  1. You'll know because someone (an article, a script, a blog entry, a friend) gave it to you.
  2. Divine inspiration
  3. Be on the same Mailing list as Riedwaan Bassadien . 

I'm lucky enough to be in category 3 so I'll share a one-liner based upon Riedwaan's recent email.

dir  REGISTRY::HKEY_CLASSES_ROOT\CLSID -include PROGID -recurse | foreach {$_.GetValue("")}

Thanks Riedwaan!

Jeffrey Snover
Windows PowerShell Architect


PSMDTAG:FAQ: How do I know what COM progids I can use?

Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post
Page 1 of 1 (4 items)