Interrogate Outlook GAL with PowerShell

marcadamcarter

New Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
I’ve been trying, without much success, to accomplish what appears to be a fairly simple task for rest of the world. My goal is to utilize PowerShell to interrogate the AddressLists collection within the Outlook.Application NameSpace object, returning a list of AddressEntries objects from my default or InitialAddressList. Whenever I attempt to execute the following PowerShell script the AddressEntries property for any of the AddressLists collections is always empty. However, others that I’ve spoken to are able to return account details about the entries located within those AddressLists.

$o = New-Object -ComObject Outlook.Application
$mapi = $o.Application.GetNamespace('MAPI')
$initAddrList = $mapi.AddressLists | ? { $_.IsInitialAddressList}
($initAddrList.AddressEntries).Count

The only caveat I can see that differentiates me from others I’ve talked to is the constraint of my employer's Outlook configuration for smart card authentication via RPC/HTTP protocol to a remote Exchange server.

I am able to successfully export contacts using Microsoft Access (as described in the following example) but missing attributes that are visible from within Outlook GAL that I was hoping to include in my data.

Share data between Access 2010 and Outlook 2010 - Office Support

I look forward to comments/thoughts.
-marc
 

Similar threads


Top