Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.17 KB

File metadata and controls

24 lines (17 loc) · 1.17 KB
pid 1081
author Peter
title
date 2009-05-06 04:02:02 -0700
format posh
parent 0

Code generates a workable replacement for User Profile details web control on the person.aspx page in SharePoint (allows you to customize the resulting generated code)

	[void]([reflection.assembly]::LoadWithPartialName("Microsoft.office.server"))

	$serverContext = [Microsoft.Office.Server.ServerContext]::Default
	$upm = [Microsoft.Office.Server.UserProfiles.UserProfileManager]$serverContext
@@	$upm.psbase.properties | ? { $_.isvisibleonviewer } | select DisplayName, name, displayorder, managedpropertyname | % { "<SPSWC:ProfilePropertyCheckValue PropertyNames=""$($_.Name)"" runat=""server"" Text=""&lt;tr&gt;&lt;td class=&quot;ms-profilelabel&quot;gt;$($_.DisplayName): &lt;/td&gt;&lt;td width=&quot;65%&quot; valign=&quot;top&quot;&gt;""/><SPSWC:ProfilePropertyValue PropertyName=""$($_.name)"" class=""ms-profilevalue"" runat=""server"" /><SPSWC:ProfilePropertyCheckValue PropertyNames=""$($_.Name)"" runat=""server"" Text=""&lt;/td&gt;&lt;/tr&gt;""/>" } >a.txt; ii a.txt