Application.Outlook error in Powershell

anirbandd

Conversation Architect
Joined
Oct 18, 2012
Messages
4,876
Hi All,

I am getting an error when running this:

Code:
$var = New-Object -ComObject Application.Outlook

Error:

Code:
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)).
At line:1 char:8
+ $var = New-Object -ComObject Application.Outlook
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [New-Object], COMException
    + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
I am running Powershell 3.0, Office 2013 x64, on Win 8 x64.

I tried both combinations of running PS and Outlook as Local and Admin, but got error in both.

I am running an x64 environment for PS.

Do i need to have x86 Outlook for this? or Do i need to install any cmdlets for outlook access from PS??

Thanks in advance! :)
 

Vyom

The Power of x480
Staff member
Admin
Joined
May 16, 2009
Messages
7,046
It does look like missing DLL issue. Maybe the code works work only in x86 version of the OS?
 
Top