Wednesday, November 23, 2016

Start a full crawl of a ContentSource in SharePoint 2013 using PowerShell


$snapin = Get-PSSnapin | Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" }
if ($snapin -eq $null) {
    Write-Host "[INIT] Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
 
$searchApp = 
    Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | 
    Where-Object { $_.Name -eq "Local SharePoint sites" }
 
if($searchApp.CrawlState -eq "Idle") {
    Write-Host "CrawlState was Idle, crawling Full" -ForegroundColor Green
    $searchApp.StartFullCrawl()
 
    Do {
        Write-Host "`r#" -ForegroundColor Yellow -NoNewline
        Start-Sleep 5
    } while ($searchApp.CrawlState -ne "Idle")
 
    Write-Host "`nFinsihed crawling" -ForegroundColor Green
 
} else{
    Write-Host "Didn't start crawl, CrawlState was"$searchApp.CrawlState -ForegroundColor Yellow
}

Stop and then start a full crawl on all content sources using PowerShell
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {
    if ($_.CrawlStatus -ne "Idle")
    {
        Write-Host "Stopping currently running crawl for content source $($_.Name)..."
        $_.StopCrawl()
        
        do { Start-Sleep -Seconds 1 }
        while ($_.CrawlStatus -ne "Idle")
    }
    
    Write-Host "Starting full crawl for content source $($_.Name)..."
    $_.StartFullCrawl()
}



Start a full crawl of a ContentSource in SharePoint 2013 using PowerShell


$snapin = Get-PSSnapin | Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" }
if ($snapin -eq $null) {
    Write-Host "[INIT] Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
 
$searchApp = 
    Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | 
    Where-Object { $_.Name -eq "Local SharePoint sites" }
 
if($searchApp.CrawlState -eq "Idle") {
    Write-Host "CrawlState was Idle, crawling Full" -ForegroundColor Green
    $searchApp.StartFullCrawl()
 
    Do {
        Write-Host "`r#" -ForegroundColor Yellow -NoNewline
        Start-Sleep 5
    } while ($searchApp.CrawlState -ne "Idle")
 
    Write-Host "`nFinsihed crawling" -ForegroundColor Green
 
} else{
    Write-Host "Didn't start crawl, CrawlState was"$searchApp.CrawlState -ForegroundColor Yellow
}

or 

Stop and then start a full crawl on all content sources using PowerShell

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {
    if ($_.CrawlStatus -ne "Idle")
    {
        Write-Host "Stopping currently running crawl for content source $($_.Name)..."
        $_.StopCrawl()
        
        do { Start-Sleep -Seconds 1 }
        while ($_.CrawlStatus -ne "Idle")
    }
    
    Write-Host "Starting full crawl for content source $($_.Name)..."
    $_.StartFullCrawl()
}


courtesy 

Monday, May 30, 2016


Important Links:

SharePoint 216:
https://technet.microsoft.com/en-us/library/mt346121(v=office.16).aspx

Simple step by step 50 examples to learn Angular with
https://github.com/curran/screencasts/tree/gh-pages/introToAngular


AD Groups cannot be used to assign permissions in SharePoint

https://support.microsoft.com/en-in/kb/2809787

SP Questions & Answers
http://en.share-gate.com/blog/recording-dont-suck-at-sharepoint-avoid-common-mistakes

SHAREPOINT 2013 : USE AD GROUPS ? YES, BUT…DON’T FORGET THE SECURITY TOKE CACHING: LOGONTOKENCACHEEXPIRATIONWINDOW AND WINDOWSTOKENLIFETIME

https://sergeluca.wordpress.com/2013/07/06/sharepoint-2013-use-ag-groups-yes-butdont-forget-the-security-token-caching-logontokencacheexpirationwindow-and-windowstokenlifetime/

All Books:
https://blogs.msdn.microsoft.com/mssmallbiz/2016/07/10/free-thats-right-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepoint-2016-sha/

https://blog.devoworx.net/2016/03/05/missing-server-side-dependencies/

http://www.advaiya.com/blog/sharepoint-2016-new-improved-and-deprecated-features

All Search Commands:
https://technet.microsoft.com/en-us/library/ff607730.aspx


Stemming SharePoint 2013:

$searchApp = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
Get-SPEnterpriseSearchLinguisticComponentsStatus -SearchApplication $searchApp

To enable:
Set-SPEnterpriseSearchLinguisticComponentsStatus -SearchApplication $searchApp -StemmingEnabled:$true

To disable:

Set-SPEnterpriseSearchLinguisticComponentsStatus -SearchApplication $searchApp -StemmingEnabled:$false