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

Thursday, October 30, 2014

Delete All Site collections [/sites] from web application using powershell

1. The Get-SPDeletedSite cmdlet lists all the deleted site collections.

2. Restore a deleted site collection.

Get-SPDeletedSite | where{$_.SiteId -eq "4563-6b2e-473b-b6c3-e0967996aa7d"} | Restore-SPDeletedSite

3. Use the Remove-SPDeletedSite to permanently remove the deleted site collection.

4. Just permanent site collection delete , won't be available to restore in Recycle bin[careful as always]

Remove-SPSite "http://sharepoint.com/sites/test"

5.  NO permanent site collection delete , still available for restore in Content database Recycle bin.

Remove-SPSite -Identity "http://sharepoint.com/sites/test1" -GradualDelete

Note: Use the (2) command to restore the site collection.

Now, let me try for my actual need :

6.  Get the all site collections under the web application

Get-SPSite "http://sharepoint.com" -Limit ALL

Now, we try find the site collections under specific root ex: http://sharepoint.com/sites/ or  http://sharepoint.com/personal/

Get-SPSite http://sharepoint.com/personal* -Limit ALL

Now , we will remove all the site collections under the /personal/ root folder

a)  Permanent delete , won't be available to restore in recycle bin  or content database

Get-SPSite "http://sharepoint.com/personal*" -Limit ALL | Remove-SPSite -Confirm:$false 

b) No permanant delete, will prompt for each site , still available for restore in recycle bin

Get-SPSite "http://sharepoint.com/personal*" -Limit ALL | Remove-SPSite -GradualDelete


This is solve the my need , to delete site collections under /personal/ root level in Sharepoint portal.

Monday, August 25, 2014

SAP BO + Unable to reconnect to the CMS :6400 . The session has been logged off or has expired. (FWM 01002)

Today, We faced below error in our SAP BusinessObjects Business Intelligence,

Error: 'Unable to reconnect to CMS :6400. The session has been logged off or has expired.(FWM 01002)'


Solution: 1. From Central Configuration Manager, disable all the services and re-enable them (or ) Restart the SIA (Server Intelligence Agent)
(OR) 2. Log into Central Management Console and go to the server area.3. Go to the properties of Central Management Server, in command line parameters type -request timeout 3600000 (60 min).