Manage order of User Profile Properties
Posted by ken zheng on May 10, 2012
I am not sure who design the page, you have to click the up arrow next to the property to move it up one and each time you click the arrow the page refreshes so you have to scroll back down before you can do it again and if you have to move the property by 50 positions that 50 clicks and 50 page refreshes –
Below script can change the order for you, and the later part is to display the order of the properties for reference
Add-Type -Path "c:\program files\common files\microsoft shared\web server extensions\14\isapi\microsoft.office.server.dll"$mySiteUrl = "http://yourmysitegoeshere"$site = Get-SPSite $mySiteUrl$context = Get-SPServiceContext $site$upConfigManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($context)$profilePropertyManager = $upConfigManager.get_ProfilePropertyManager()$upConfigManager.GetProperties().SetDisplayOrderByPropertyName("SIMCARD",5510)$upConfigManager.GetProperties().CommitDisplayOrder()$AllProperties = $upConfigManager.GetProperties()foreach($prop in $AllProperties){$DisplayName = $prop.DisplayName$DisplayOrder = $prop.DisplayOrderwrite-host $DisplayName, ";", $DisplayOrder, ";"}write-host "Finished."
This entry was posted on May 10, 2012 at 6:31 am and is filed under PowerShell, Sharepoint. Tagged: PowerShell, SharePoiint 2010, User Profile. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Ian Morrish said
That UI has not changed since SPS 2003 (and it used to drive me crazy back then). What is the bet it is still the same in 2013
anilkuchi said
Hi This works absolutely fine for default profile sub type but if we have more than one profile sub type its not updating them ,can you suggest me how can we achieve that