日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SharePoint 2013技巧分享系列 - 同步Exchange显示高清用户照片

發布時間:2023/12/15 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SharePoint 2013技巧分享系列 - 同步Exchange显示高清用户照片 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在“SharePoint 2013技巧分享系列 - Active Directory同步顯示用戶照片”文中介紹了如何同步Active Directory顯示用戶照片,但是同步完成后,用戶照片尺寸和清晰度都不是非常理想。本文將介紹如何同步Exchange Server顯示高清用戶照片。

原理

與SharePoint Server 2010相似, 在SharePoint Server 2013中存在一個用戶照片的目錄。當SharePoint啟用Exchange照片同步時, SharePoint將使用Exchange Server 2013 作為照片存取目錄, 而SharePoint本地照片目錄將被屏蔽,也就是說,設置SharePoint-Exchange照片同步后,將不允許用戶通過SharePoint修改其頭像照片。在Central Administration - User Profile - Manage User Profiles中可以看到Picture屬性顯示“You can't change this person's photo because it is synchronized with Microsoft Exchange.".?

需要注意的是,在進行同步設置時,要對Exchange Server進行簡單的配置,并且需要重新啟動IIS。 而在SharePoint 2013中需要配置相關權限和服務,使SharePoint 2013能夠連接Exchange Server并獲取用戶數據。

環境實例

為了避免誤解,這里我們實現定義一些環境配置,方便在詳細步驟中調用:

1. SharePoint Server 2013 (http://people), 需要添加Alternate Access映射https://people. 該連接指向My Site。?

?

2. Exchange 2013 Client Access server (FQDN) http://e15fe.test.com。

3. Exchange 2013 Mailbox server (FQDN) http://e15be.test.com。 確認測試用戶帳號已經創建, 例如 kevin@test.com。 另外確認高清照片已經上傳。

4. 添加DNS record, 使autodiscover.test.com指向http://e15fe.test.com。

?

步驟

確認以上所有配置后,我們將進行以下幾個步驟的配置 。

第一步,添加Exchange 2013 Autodiscover服務,在Exchange Management Shell command中運行以下命令,

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri?https://autodiscover.test.com/autodiscover/autodiscover.xml

?

第二步, SharePoint 2013 使用外部連接EWS和ECP讀取Exchange 2013 用戶照片數據。 現在我們需要使用Exchange Management Shell command運行,

Get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory –InternalUrl https://e15fe.test.com/ews/exchange.asmx –ExternalUrl https://e15fe.test.com/ews/exchange.asmx

Get-EcpVirtualDirectory | Set-EcpVirtualDirectory –InternalUrl https://e15fe.test.com/ecp –ExternalUrl https://e15fe.test.com/ecp

?

第三步,完成以上Exchange server配置后,需要在SharePoint 2013安裝Exchange Web Services Managed API v2.0,并且將Microsoft.Exchange.WebServices.dll載入到GAC中。 這一步驟我們需要使用.NET 4中的命令GacUtil,所以,在進行這一步驟前,請確認.Net 4.0 SDK已經安裝在服務器上。完成安裝后,在PowerShell中運行以下命令載入Microsoft.Exchange.WebServices.dll。 載入完成后,需要重新啟動IIS。

Set-location "C:\Program Files\Microsoft\Exchange\Web Services\2.0"

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall("c:\Program Files\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll")

iisreset

?

第四步,在SharePoint 2013中配置S2SOAuth,使用SharePoint 2013 Management Shell command運行以下命令:

New-SPTrustedSecurityTokenIssuer -name "Exchange" -MetadataEndPoint "https://email.test.com/autodiscover/metadata/json/1"

$sts=Get-SPSecurityTokenServiceConfig

$sts.HybridStsSelectionEnabled = $true

$sts.AllowMetadataOverHttp = $false

$sts.AllowOAuthOverHttp = $false

$sts.Update()

$exchange=Get-SPTrustedSecurityTokenIssuer "Exchange"

$app=Get-SPAppPrincipal -Site http://people -NameIdentifier $exchange.NameId

$site=Get-SPSite http://people

Set-SPAppPrincipalPermission -AppPrincipal $app -Site $site.RootWeb -Scope sitesubscription -Right fullcontrol -EnableAppOnlyPolicy

?

第五步, 在Exchange server中配置S2SOAuth,在Exchange Management Shell中運行以下命令

cd \Program Files\Microsoft\Exchange Server\V15\Scripts>

.\Configure-EnterprisePartnerApplication.ps1 -AuthMetadataUrl https://people/_layouts/15/metadata/json/1 -ApplicationType sharepoint

完成以上命令后,需要重啟IIS,

iisreset e15fe

iisreset e15be

?

第六步,配置SharePoint 2013 和Exchange server照片同步

$wa = Get-SPWebApplication http://people

$wa.Properties["ExchangeAutodiscoverDomain"] = "email.test.com"

$wa.UserPhotoImportEnabled = $true

$wa.UserPhotoErrorExpiration = 1.0

$wa.UserPhotoExpiration = 6.0

$wa.Update()

?

完成以上步驟后,使用測試帳戶登陸進入http://people,刷新后即可從Exchange服務器獲取高清用戶照片。

需要注意的是,如果仍舊顯示Active Directory小照片,可以在Central Administration - User Profile Service - Manage User Properties中,編輯Picture屬性,刪除其中Active Directory映射的Property Mapping for Synchronization,然后”Start Full Profile Synchronization“即可。

?

對比顯示結果:

同步前

同步后

在http://people中大照片顯示對比更加明顯,這里就不再上傳了。

如果你有更好的建議和方法,歡迎留言討論。

本文轉自?冷秋寒??51CTO博客,原文鏈接:http://blog.51cto.com/kevinfan/1557167?,如需轉載請自行聯系原作者

總結

以上是生活随笔為你收集整理的SharePoint 2013技巧分享系列 - 同步Exchange显示高清用户照片的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。