Scenario/Problem: You want to remove comments from the Profile Service Application.
Solution: Use the Remove-SPSocialItemByDate
cmdlet with the RemoveRatings
parameter.
The Remove-SPSocialItemByDate
cmdlet enables you to remove comments, tags, or ratings before a particular required end date. Listing 14.5 shows an example command line.
$profileProxy = Get-SPServiceApplicationProxy -Identity 150232e4-a3d2-
4915-adb1-155ea77a6dfb
Remove-SPSocialItemByDate -ProfileServiceApplicationProxy
$profileProxy -RemoveRatings:$true -EndDate 12/1/2013 -Confirm:$false
RemoveRatings
is a Boolean parameter, although it looks like a switch parameter. Therefore, either $true
or $false
needs to be provided as the Boolean value. The service application proxy for the User Profile Service is needed and can be obtained by reviewing the output from Get-SPServiceApplicationProxy
.
3.135.197.201