SharePoint 2010 Record Declaration Settings via Powershell


This is how, we can set manual declaration of records via PowerShell in SharePoint 2010.

Add-PSSnapin Microsoft.SharePoint.Powershell
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Policy")

# Initialization
$webUrl = 'http://demo2010a:90/sites/Contracts'
$web = Get-SPWeb $webUrl;
$list = $web.Lists["TestList"]
[Microsoft.Office.RecordsManagement.RecordsRepository.Records]::
ConfigureListForAutoDeclaration($list, $False);
$list.RootFolder.Properties["ecm_IPRListUseListSpecific"] = "True"
$list.RootFolder.Properties["ecm_AllowManualDeclaration"] = "True"
$list.RootFolder.Update()
profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts

+