创建FileShare的content source的SharePoint 2013的powershell脚本

Add-PSSnapin "Microsoft.SharePoint.PowerShell"

#Get SSA and then create a new content source
$SSA = Get-SPEnterpriseSearchServiceApplication -Identity "SSA"  
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA -Type File -name 'gtr' -StartAddresses 'file://wac/fileshare'

#Get content source and start crawl
$ContentSource = $SSA | Get-SPEnterpriseSearchCrawlContentSource -Identity "gtr" 
$ContentSource.StartFullCrawl()

#Verify the status of all content sources
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA 

posted on 2013-06-07 14:36  中道学友  阅读(224)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上