当需要编辑SharePoint User的Work Email 以及 About Me 字段, 当点击用户| Edit User 的之后弹出的模态窗口只显示一个字段其不能够编辑。
最近因为在做OPS的工作,自然PS 少不了, 问题的原因就是SharePoint 的隐藏字段了。
1: $LaunchSite = Get-SPSite XXXXXX
2: $LaunchUserList = $LaunchSite.RootWeb.Lists | ?{$_.Title -eq "User Information List"}
3: $WorkEmailField = $LaunchUserList.fields | ?{$_.Title -eq "Work e-mail"}
4: $WorkEmailField.ReadOnlyField = $false
5: $WorkEmailField.Update()
6: $AboutMeField = $LaunchUserList.fields | ?{$_.Title -eq "About me"}
7: $AboutMeField.ReadOnlyField = $false
8: $AboutMeField.Update()