Thursday, January 11, 2018

Enable Crawl for DropOffLibrary Documents using PowerShell - SharePoint

clear  
Remove-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue  
Add-PSSnapin Microsoft.SharePoint.Powershell 

################## ENVIRONMENT VARIABLES ##################

$siteUrl = "https://record-site-coll-url"


###########################################################

$dropOffLibrary ="Drop Off Library"
try
{
    $site=Get-SPSite $siteUrl
    $web=$site.RootWeb
    $docLibrary =$web.Lists[$dropOffLibrary]
    # Change the advanced settings
    $docLibrary.NoCrawl = $false;
    $docLibrary.Update()
    $site.Dispose()
    write-host "Completed"
}
catch
{
    write-host "Error"
}


No comments:

Post a Comment

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...