# All COM objects possible with New-object -COMOBJECT parameter

**URL:** <https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571>\
**Category:** PowerShell Help\
**Created:** [October 28, 2018, 9:24pm UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571 "2018-10-28T21:24:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtan2010](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rtan2010/32/1173_2.png) [@rtan2010](https://forums.powershell.org/u/rtan2010)\
**Post date:** [October 28, 2018, 9:24pm UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/1 "2018-10-28T21:24:34Z")

</div>

I’ve been using New-object in conjunction with EXCEL and ACCESS, e.g.,

```
New-object -COM ADODB.Connection

New-object -COM ADODB.Recordset

New-object -COM EXCEL.Application
```

Is there a listing somewhere (not including .NET objects) of all (or the most common) values of objects that can be used with -COM parameter of New-object? Perhaps I am not asking the question properly, but I am a beginner to PS, and would appreciate any advice, tips or references to the appropriate source of information.

Thanking you in advance.

&nbsp;

---

<div class="post-metadata">

**Author:** ![neemobeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/neemobeer/32/4087_2.png) [@neemobeer](https://forums.powershell.org/u/neemobeer)\
**Post date:** [October 29, 2018, 5:23am UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/2 "2018-10-29T05:23:02Z")

</div>

You’ll want to look in the registry under **HKCR:\CLSID**

Then look under each GUID. Generally if there is a subkey **VersionIndependentProgID** the default value under this key can potentially be a callable COM object.

```
New-PSDrive -Name HKCR -Root HKCR -PSProvider Registry

$RootPath = "HKCR:\CLSID"

$CLSIDs = Get-ChildItem $RootPath

Foreach($CLSID in $CLSIDs)
{
$GUID = Split-Path -Leaf $CLSID.Name
$CLSIDPath = "$RootPath\$GUID\VersionIndependentProgID"

If(Test-Path $CLSIDPath)
{
Write-Host $CLSIDPath
Get-ItemProperty -Path $CLSIDPath -Name "(Default)" | Select "(Default)"
}
}
```

&nbsp;

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [October 29, 2018, 1:07am UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/3 "2018-10-29T01:07:26Z")

</div>

I don’t think there is any documentation out there with the list. I always just do trial and error method if there are no documentations.

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [October 29, 2018, 3:33am UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/4 "2018-10-29T03:33:24Z")

</div>

In the past I have used the OLE\_COM Object explorer… I think this is the link [| Microsoft Docs](https://msdn.microsoft.com/en-us/library/d0kh9f4c.aspx)

&nbsp;

---

<div class="post-metadata">

**Author:** ![rtan2010](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rtan2010/32/1173_2.png) [@rtan2010](https://forums.powershell.org/u/rtan2010)\
**Post date:** [October 29, 2018, 4:03am UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/5 "2018-10-29T04:03:58Z")

</div>

Many thanks, Mr Simon B, this is useful as a starting point … much appreciated.

---

<div class="post-metadata">

**Author:** ![rtan2010](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rtan2010/32/1173_2.png) [@rtan2010](https://forums.powershell.org/u/rtan2010)\
**Post date:** [October 29, 2018, 5:39am UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/6 "2018-10-29T05:39:11Z")

</div>

Hello Neemobeer,

Your script has saved me many man hours of guesswork.

Much appreciated, my sincerest thanks.

&nbsp;

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:33pm UTC](https://forums.powershell.org/t/all-com-objects-possible-with-new-object-comobject-parameter/11571/7 "2024-05-16T20:33:47Z")

</div>

Closed on May 16, 2024, 8:33pm UTC


