PowerTip: List Outlook Contacts with PowerShell

PowerTip: List Outlook Contacts with PowerShell

  • Comments 5
  • Likes

Summary: Use Windows PowerShell to list contacts in Microsoft Outlook.

Hey, Scripting Guy! Question How can I use Windows PowerShell to programmatically connect to Outlook to get the Contacts list?

Hey, Scripting Guy! Answer Connect by using ComObject, and select the objects you need:

$Outlook=NEW-OBJECT –comobject Outlook.Application

$Contacts=$Outlook.session.GetDefaultFolder(10).items

$Contacts | Format-Table FullName,MobileTelephoneNumber,Email1Address

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Nope. Too easy. Now load them into SharePoint on O365. It takes about three more steps.

  • Hello,
    How can I export this contacts to msg files?
    THX

  • How would I delete the contacts? I tried changing the last line to "$Contacts | Remove-Item" but it didn't work. The user has 63,000 contacts that were sync'd with CRM so doing this manually would take too long. Any suggestions?

  • gud