- Open SharePoint 2010 Management Shell by going to Start | All Programs | SharePoint | Microsoft SharePoint 2010 Products | SharePoint 2010 Management Shell (Run as Administrator).
- Run the following script.
Powershell Script:
##Get the user profile property information by account name using SharePoint 2010 web service in powershell
$uri="http://serverName:10736/sites/ECT2/_vti_bin/UserProfileService.asmx?wsdl"
## $accountName is a string that contains the account name for which we need to get the profile property information
$accountName="rd\kwnt974"
## Web Service Reference - http://Site/_vti_bin/UserProfileService.asmx
$userProfileWebServiceReference = New-WebServiceProxy -Uri $uri -UseDefaultCredential
$propertyData=$userProfileWebServiceReference.GetUserProfileByName($accountName)
Write-Host -ForegroundColor Magenta "Getting the user profile property information by account name"
foreach($property in $propertyData)
{
Write-Host -ForegroundColor Yellow $property.Name
}
Output:

Larry VirdenPosted Sep 19, 2014, 7:17 AM
The powershell script above nicely retrieves the names of the properties. I am trying to figure out how to display the values of those properties on the same line.