Submitted By: Kent Finkle

Lists the full name and business telephone number for all the contacts in the Microsoft Outlook Contacts folder.

PowerShell
Edit|Remove
$comments = @'
Script name: Retrieve-ContactInfo.ps1
Created on: Monday, July 23, 2007
Author: Kent Finkle
Purpose: How can I use Windows Powershell to
Retrieve Contact Information?
'@
 
$olFolderContacts = 10
 
$o = new-object -comobject outlook.application
 
$n = $o.GetNamespace("MAPI")
 
$c = $n.GetDefaultFolder($olFolderContacts).Items
 
foreach ($a In $c) { 
    Write-Host($a.FullName, $a.BusinessTelephoneNumber)
}