Logo 
Search:

Sharepoint 2010 Articles

Submit Article
Home » Articles » Sharepoint 2010 » Content ManagementRSS Feeds

Get all the items from Hold Reports list using powershell

Posted By: Vijai Anand Ramalingam     Category: Sharepoint 2010     Views: 2092

In this article we will be seeing how to get all the items from Hold Reports list using powershell

I have a SharePoint site and I have activated the Site feature (Go to Site Actions => Site Settings => Site Actions => manage Site features) “Hold and eDiscovery”.

I have two items in the “Hold Reports” (Go to Site Actions => Site Settings => Hold and eDiscovery  => Hold Reports).

We are going to retrieve these items 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("http://serverName:22222/sites/Test/
")
$web = $site.RootWeb
$holds=[Microsoft.Office.RecordsManagement.Holds.Hold]::GetHoldReportsList($web)
write-host -f green "HoldsReportList:  " $holds.Title
foreach($item in $holds.Items)
{
  write-host $item.DisplayName
}
$web.Dispose()
$site.Dispose()

Share: 



Vijai Anand Ramalingam
Vijai Anand Ramalingam author of Get all the items from Hold Reports list using powershell is from India. Vijai Anand Ramalingam says Hello Everyone,
I am Vijai Anand Ramalingam from India
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!