Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: List Outlook Contacts with PowerShell

$
0
0

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


Viewing all articles
Browse latest Browse all 17778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>