Revisiting: Listing all the COM automation PROGIDs

Revisiting: Listing all the COM automation PROGIDs

  • Comments 3

In the blog entry Listing all the COM automation PROGIDs http://blogs.msdn.com/powershell/archive/2006/06/29/650913.aspx . I showed how you could use the registry to get all the progids that you can use for COM automation.

Here is a way to do the same thing via WMI (which allows you to do it to remote machines):

Get-WMIObject Win32_ProgIDSpecification |
   Sort ProgID |
   Format-Table ProgID,Description -auto

Jeffrey Snover [MSFT]
Windows PowerShell Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

PSMDTAG:FAQ:  COM Progids - How do I know which I can use (answer 2)?
PSMDTAG:FAQ: COM Progids - How can I see a description associated with them?
PSMDTAG:TYPE:COM: progids
PSMDTAG:TYPE:WMI: Win32_ProgIDSpecification

Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post
  • I do miss some I think :

    PoSH>(dir  REGISTRY::HKEY_CLASSES_ROOT\CLSID -include PROGID -recurse | foreach {$_.GetValue("")} | measure-object).count
    2498
    PoSH>(Get-WMIObject Win32_ProgIDSpecification | measure-object).count
    22

    Greetings /\/\o\/\/

    P.S. I did say No to the internet connection that i twice tried to make (windows update)
  • I also did a remote Enabled Version of your Registry ProgID check :

    $MachineName = '.'

    $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::ClassesRoot, $MachineName)
    $regKey = $reg.OpenSubKey("CLSID" ,$False)
    $regkey.GetSubKeyNames() |% {
     $sk = $regkey.OpenSubKey($_,$false)
     $sk.GetSubKeyNames() |? {$_ -eq 'ProgID'} |% {
       $sk.OpenSubKey($_,$false).getvalue("")
     }
    }

    Greetings /\/\o\/\/
  • Here is a quick addition to MOW's script that takes an optional filter, and machine name as parameters.

    param([string] $Filter, [string] $MachineName)

    if (-not $Filter)
    {
     $MachineName = '.'
    }

    if (-not $Filter)
    {
     $Filter = '*'
    }

    $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::ClassesRoot, $MachineName)
    $regKey = $reg.OpenSubKey("CLSID" ,$False)
    $regkey.GetSubKeyNames() |% {
    $sk = $regkey.OpenSubKey($_,$false)
    $sk.GetSubKeyNames() |? {$_ -eq 'ProgID'} |% {
      $Value = $sk.OpenSubKey($_,$false).getvalue("")
      if ($Value -like $Filter) {
        $Value
      }
    }
    }
Page 1 of 1 (3 items)