Forum Discussion

Newbee321's avatar
Newbee321
Copper Contributor
Oct 15, 2021

Retrieving the COM class factory for component with CLSID

Hi,

I need to move an old script from old server to new one. Getting following error when I run below code.

$file = New-Object - ComObject Excel.Application

 

Error : New-Object : Retrieving the COM class factory for component with CLSID {00000000-0000-0000-0000-000000000000} failed due to the following error: 80040154
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

 

I tried installing Excel package for PowerShell. Can someone guide what else might be missing or needs to be installed since it's brand new server?

 

Thanks! 

  • AndySvints's avatar
    AndySvints
    Steel Contributor

    Hello Newbee321,

    AFAIK you need to have Microsoft Excel installed on the server to create a COM object.

     

    Hope that helps.

Resources