$site = New-Object Microsoft.SharePoint.SPSite("yoursiteurl")
$web = $site.openweb("")
$Library = "working
documents"$DocLib = $web.lists[$Library]
Write-Host "title" $DocLib
foreach ($item in $DocLib.items)
{
if($item["ARCHIVED"]) #if it is checked (Archived is a site
col)
{
write-host "Archived:" $item["ARCHIVED"] $item.title $item["ARCHIVED"] = "0" #Uncheck the
checkbox
$item.Update()
write-host "Archived:" $item["ARCHIVED"]
}
}
$web.dispose()
$site.dispose()
No comments:
Post a Comment