Get the total number of all social tags created by the specified user using SharePoint 2010 web service in powershell

Steps Involved:
  1. Open SharePoint 2010 Management Shell by going to Start | All Programs | SharePoint | Microsoft SharePoint 2010 Products | SharePoint 2010 Management Shell (Run as Administrator).
  2. Run the following script.

Powershell Script:

 
##Get the total number of all social tags created by the specified user using SharePoint 2010 web service in powershell
$uri="http://serverName:10736/sites/ECT/_vti_bin/SocialDataService.asmx?wsdl"
## $accountName is a string that contains the account name
$accountName="domainName\userName"
 
## Web Service Reference - http://Site/_vti_bin/SocialDataService.asmx
$socialDataServiceWebServiceReference = New-WebServiceProxy -Uri $uri -UseDefaultCredential

[
int]$CountTagsOfUser=$socialDataServiceWebServiceReference.CountTagsOfUser($accountName)
Write-Host -ForegroundColor Green "Number of social tags created by the specified account name : " $CountTagsOfUser




Ebook Download
View all
Learn
View all