Saturday, December 5, 2015

Change the Display Order for a User Property in SharePoint User Properties with PowerShell


#First create a connection to the User Profile Manager

$MySite = Get-SPSite http://MySite
$context = Get-SPServiceContext $MySite
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

#Then type To view the current order
$profilemanager.properties | ft name,displayorder


#set the display order for a property
$profileManager.Properties.SetDisplayOrderByPropertyName("Languages",16)
$profileManager.Properties.CommitDisplayOrder()