﻿# 如何更新 Office 365 上面的使用者照片並清除本地快取

我一直以來在使用 Office 365 的時候都有個小問題，那就是我在 Office 365 設定好的頭像 ( UserPhoto ) 在 Outlook Web Access 上面是正常顯示的，在我的 Outlook 是正常顯示的，在大部分同事的電腦也是正常顯示，但就是 Outlook for Mac 上面顯示的一直是我半年前上傳的舊照片，這個小問題直到最近才真正徹底解決。

其實我從去年就在 Skype for Business ( 以前叫 Lync ) 就一直只能顯示舊版照片，而且還一直無法更新，害我一直不想打開這個軟體使用！XD

好吧，直接進入重點！

首先，你必須先以全域管理員身分，透過 PowerShell 管理 Office 365，並先輸入以下命令：

> **Get-UserPhoto -Identity 您的信箱**

照理說會輸出一些資訊，這就代表你目前已經設定過使用者照片 ( UserPhoto )。

接著，透過 Remove-UserPhoto 命令，搭配 \-ClearMailboxPhotoRecord 參數，將照片移除乾淨。

> **Remove-UserPhoto -Identity 您的信箱 -ClearMailboxPhotoRecord**

最後，將你的 Outlook 應用程式重開，看有沒有讀到新的、正確的使用者照片。

如果還是舊的照片，那就要清除快取才可以立即生效。

Outlook for Mac 清除快取的方式如下：

1.  刪除名為 **您的信箱** 的快取檔案

-   /User/<your user account>/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/<your profile number>/Caches/Image Cache

3.  到以下路徑把 **oab.xml** 檔案刪除

-   /User/<your user account>/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/<your profile number>/Download/
-   /User/<your user account>/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/<your profile number>/index…./

  

**相關連結**

-   [Remove-UserPhoto](https://technet.microsoft.com/zh-tw/library/jj218610\(v=exchg.160\).aspx)
-   [Get-UserPhoto](https://technet.microsoft.com/zh-tw/library/jj218687\(v=exchg.160\).aspx)
-   [Updated user photos don't appear in the address book in Office 365 Dedicated/ITAR (vNext)](https://web.archive.org/web/20190916075129/https://support.microsoft.com/en-us/help/3163369/updated-user-photos-don-t-appear-in-the-address-book-in-office-365)
-   [O365 AND EXCHANGE 2016/EXCHANGE 2013: UNDERSTANDING THE USERPHOTO API](https://chris-golden.com/)
