Last active
January 12, 2022 23:32
-
-
Save constructor-igor/e80e24c5501c3a222283 to your computer and use it in GitHub Desktop.
Powershell: list of all entries from Outlook Global Address List (GAL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the code , I can use it.
My GAL is under 20K so I just iterate thru $entries multiple times