Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save constructor-igor/e80e24c5501c3a222283 to your computer and use it in GitHub Desktop.
Save constructor-igor/e80e24c5501c3a222283 to your computer and use it in GitHub Desktop.
Powershell: list of all entries from Outlook Global Address List (GAL)
[Microsoft.Office.Interop.Outlook.Application] $outlook = New-Object -ComObject Outlook.Application
$entries = $outlook.Session.GetGlobalAddressList().AddressEntries
$count = $entries.Count
$count
foreach($entry in $entries)
{
[console]::WriteLine("{0}: {1}", $entry.Name, $entry.GetExchangeUser().MobileTelephoneNumber)
}
@robertcatgithub
Copy link

Thanks for the code , I can use it.
My GAL is under 20K so I just iterate thru $entries multiple times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment