Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Remove-SPSocialItemByDate : Query processor could not produce a query plan because of the hints defined in this query.

$
0
0

Hi Team,

I have been working on the below script to delete all social data from the sharePoint application before it goes live.

Pls find my code below.

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{ 
    Add-PSSnapin "Microsoft.SharePoint.PowerShell" 
} 
$todaysdate=Get-Date -format d
$userProfProxy = Get-SPServiceApplicationProxy | where { $_.DisplayName -eq 'User Profile Service Application' }

Remove-SPSocialItemByDate -RemoveComments 1 -ProfileServiceApplicationProxy $userProfProxy  -EndDate $todaysdate
Remove-SPSocialItemByDate -RemoveTags 1 -ProfileServiceApplicationProxy $userProfProxy -EndDate $todaysdate
Remove-SPSocialItemByDate -RemoveRatings 1 -ProfileServiceApplicationProxy $userProfProxy -EndDate $todaysdate
Write-Host -f green "Social Feed, Tags and comments deleted for users"

I am getting the below error.

Remove-SPSocialItemByDate : Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.


Thanks Ba$va


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>