June 29th, 2006

Listing all the COM automation PROGIDs

PowerShell Team
PowerShell Team

<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!

Enjoy!
Jeffrey Snover
Windows PowerShell Architect

 

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

Category
PowerShell

Author

PowerShell Team
PowerShell Team

PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.

0 comments

Discussion are closed.