以程式設計方式匯出 Outlook 全域通訊簿 - 不透過 Exchange

以程式設計方式匯出 Outlook 全域通訊簿 - 不透過 Exchange

尋找一種程式設計方式(即 Outlook COM 物件/MAPI 等)來下載全球通訊簿。我可以透過 Outlook GUI 執行此操作:檔案 > 資訊 > 帳戶設定 > 下載通訊簿。

答案1

從您的工作站使用 Powershell,我會嘗試類似的方法

$filter = (Get-GlobalAddressList 'Default Global Address List').RecipientFilter

Get-Recipient -RecipientPreviewFilter $filter | Select-Object Name,PrimarySmtpAddress | Export-CSV c:\GAL.csv -NoTypeInformation

或者

get-mailbox -resultsize unlimited | | get-user | select DisplayName,Phone,WindowsEmailAddress | export-csv c:\GAL-Export.csv -NoTypeInformation

相關內容