我们可以使用"-SyncFromAD"在SharePoint和Active Directory之间同步用户信息吗?命令,当用户在SharePoint上的帐户与他/她在Active Directory上的帐户不同时 [英] Can we Sync user's information between SharePoint and Active Directory using "-SyncFromAD" command, when the user's Account on SharePoint is different from his/her Account on Active Directory

查看:46
本文介绍了我们可以使用"-SyncFromAD"在SharePoint和Active Directory之间同步用户信息吗?命令,当用户在SharePoint上的帐户与他/她在Active Directory上的帐户不同时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

W e有几个用户,其活动目录上的帐户值已更改(他们的用户相同(相同的GUID),但是他们的帐户名已更新),因此,他们的帐户值在Sharepoint上无效(我可以检查 在userdis.aspx页面中查看其帐户的值).同样在我们的情况下,我们没有配置用户个人资料服务.

We have a couple of users whose accounts values on active directory have been changed (their users are the same (same GUID) but their accounts' names were updated), and as a result their accounts values on Sharepoint became invalid (i can check their accounts' values inside the userdis.aspx page). also in our case we did not configure a User Profile Service.

我通常使用以下脚本在SP和AD之间同步用户的电子邮件和显示名称:-

I usually sync the users' Email and Display name between SP and AD, using the following script:-

Get-SPUser –Web "http://servername/sites/WikiSite" | Set-SPUser –SyncFromAD

现在,此脚本将能够在SharePoint中更新大多数用户的信息以匹配广告, ,但是对于在Sharepoint上拥有其帐户而不是AD的用户,上述脚本会引发此错误:-

Now this script will be able to update most of the users' info inside SharePoint to match AD, but for the users who have their accounts on Sharepoint different from AD, the above script will raise this error:-

et-SPUser : Cannot get the full name or e-mail address of user "i:0#.w|ad-****\****.****".
At line:1 char:60
+ Get-SPUser –Web "http://servername/sites/WikiSite" | Set-SPUser –SyncFromA ...
+                                                            ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletSetUser:SPCmdletSetUser) [Set-SPUser], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetUser

所以我的问题是,是否有一种方法可以同步共享点用户的帐户以匹配该帐户在广告上?或强制使用"–SyncFromAD"用于基于同步的命令 用户的GUID,而不是用户的帐户..因为GUID是用户的永久值,与可以更改的帐户不同.




so my question is if there is a way i can sync the sharepoint users' accounts to match the accounts on AD? or to force the "–SyncFromAD" command to base the sync on the users' GUID rather than on users' Accounts.. as GUIDs are permanent values for users, unlike Accounts which can be changed..




推荐答案

Set-SPUser -SyncFromAD不提供与用户帐户GUID匹配的参数,请在下面的参数列表中查看此命令:

Set-SPUser -SyncFromAD not provide parameter to match User Account GUID, please check the parameter list below for this command:

Set-SPUser命令

根据您的要求,我强烈建议使用User Profile Service应用程序在AD和SharePoint之间同步User Profile数据,而不是自己编写PowerShell.这是Microsoft同步SharePoint的用户配置文件的官方方法,请 检查以下详细步骤:

For your requirement, I would highly recommend to use User Profile Service Application to sync User Profile data between AD and SharePoint rather than write PowerShell yourself. This is the Microsoft Official way to sync User Profiles for SharePoint, please check the detailed steps below:

这会将所有用户配置文件同步到SharePoint,这是满足您要求的最佳选择.

This will sync all User Profile to SharePoint, it's the best option to meet your requirement.

更多信息:

在SharePoint Server 2013中同步用户和组配置文件

谢谢

最好的问候


这篇关于我们可以使用"-SyncFromAD"在SharePoint和Active Directory之间同步用户信息吗?命令,当用户在SharePoint上的帐户与他/她在Active Directory上的帐户不同时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆