- 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 total number of user profiles using SharePoint 2010 web service in powershell
$uri="http://serverName:10736/sites/ECT2/_vti_bin/UserProfileService.asmx?wsdl"
## Web Service Reference - http://Site/_vti_bin/UserProfileService.asmx
$userProfileWebServiceReference = New-WebServiceProxy -Uri $uri -UseDefaultCredential
$count=$userProfileWebServiceReference.GetUserProfileCount()
Write-Host -ForegroundColor Green "Total Number of user profiles: " $count
Output:

Join the conversation! Your thoughts help the community grow.