$site = New-Object Microsoft.SharePoint.SPSite("yoursiteurl")
$web = $site.openweb("")
$Library = "workingdocuments"
$DocLib = $web.lists[$Library]
Write-Host "title" $DocLib
Write-Host "search" $DocLib.NoCrawl
$DocLib.NoCrawl = $false #if it is false
search will be enabled
Write-Host "search enabled:" $DocLib.NoCrawl
$DocLib.update()
$web.dispose()
$site.dispose()
No comments:
Post a Comment