In Shared Documents I have a document "New”, here I am going to check whether the item is in hold or not using powershell.
Go to Start => All Programs => Microsoft SharePoint 2010 Products => SharePoint 2010 Management Shell => Run as an administrator. => Run the following script.
$site = get-SPSite("
$web = $site.RootWeb
$list = $web.Lists["Shared Documents"]
foreach ($item in $list.Items)
{
if ($item.DisplayName.ToString() -eq "New")
{
if([Microsoft.Office.RecordsManagement.Holds.Hold]::IsItemOnHold($item))
{
write-host -f green $item.DisplayName "is on hold"
}
}
}

Join the conversation! Your thoughts help the community grow.