Share via

PowerShell fails to launch excel with CLSID COM error

Anonymous
2021-12-28T19:57:28+00:00

Hi Community,

Really simple issue here we cannot figure out:

  1. Since 2015, Microsoft released this functionality and is officially documented here
  2. When we try to run the command in PowerShell below this is what happens:

$excel = New-Object -ComObject Excel.Application

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)).

  • CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
  • FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

Troubleshooting completed:

  1. Tested this on other computers. It is hit or miss, about 50% of the computers work and 50% give the error message below.
  2. Gave users local admin rights, same issue
  3. Reinstalled Microsoft Office, same issue
  4. Ran SFC/DISM, reinstalled .NET, same issue
  5. If we right click PowerShell and select RUN AS ADMIN, the command works without any errors!

At this point we are stumped. All computers are on latest Windows 10 patch and are basically standard setups (no fancy configurations). I opened a ticket with Microsoft and they said to come here because they do not support PowerShell being used this way.

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-12-29T02:15:07+00:00

    Hi ,Brian Arredondo

    Welcome to Microsoft Community.

    Let me point you in the right direction.

    I would suggest you to post your query in https://docs.microsoft.com/en-us/ team and they will help you with the appropriate details.

    Best Regards,

    Hinata

    Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments