Deletes social tag with the current user current user for the specified URL 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:

 
##Delete a social tag associated with the current user for the specified URL and social tag keyword using SharePoint 2010 web service in powershell
$uri="http://serverName:10736/sites/ECT/_vti_bin/SocialDataService.asmx?wsdl"
## $url is a string that contains the URL for which the all the tags has to be deleted for the current user
$url="http://serverName/sites/teamsite/"
$keyword="new tag"

## Get the credential for whom the tags has to be deleted
$credential=Get-Credential

## Web Service Reference - http://Site/_vti_bin/SocialDataService.asmx
$socialDataServiceWebServiceReference = New-WebServiceProxy -Uri $uri -Credential $credential
$socialDataServiceWebServiceReference.DeleteTagByKeyword($url,$keyword)

The above script will delete the tag named "new tag" for the current user and specified URL.

Ebook Download
View all
Learn
View all