SPSearchContentSource CrawlSetting not applied for ContentSourceType Website
Details of the scenario you try and problem that is occurring: For Content Sources of type website the CrawlSetting is not configured to crawl only the fist level. Custom is selected instead without limitation.
The DSC configuration that is using the resource:
SPSearchContentSource "ContentSource_$($ContentSource.Name.Replace(' ', ''))" {
Name = $ContentSource.Name
ServiceAppName = $SearchServiceApplicationName
Addresses = $ContentSource.Addresses
ContentSourceType = "Website"
CrawlSetting = "CrawlFirstOnly"
IncrementalSchedule = MSFT_SPSearchCrawlSchedule {
ScheduleType = "Weekly"
CrawlScheduleDaysOfWeek = @("Sunday")
StartHour = "09"
StartMinute = "0"
}
Priority = "Normal"
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
DependsOn = "[SPSearchTopology]SearchTopology"
}
Version of the Operating System and PowerShell the DSC Target Node is running: Windows Server 2012 R2, PowerShell 5.1
Version of the DSC module you're using: 1.7
@typozh Any chance you can share your verbose output on this one so we can see the code path it took based on the cmdlets it shows?
Hi Brian, I included the verbose log for two content sources. Starmind is existing, SwissRePublicWebsite is a new source. The test for Starmind seems to fail. VERBOSE: [APPServer1]: LCM: [ Start Resource ] [[SPSearchContentSource]ContentSource_Starmind] VERBOSE: [APPServer1]: LCM: [ Start Test ] [[SPSearchContentSource]ContentSource_Starmind] VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Testing Content Source Setting for 'Starmind' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Getting Content Source Setting for 'Starmind' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Get-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Test-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Get-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Test-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: LCM: [ End Test ] [[SPSearchContentSource]ContentSource_Starmind] in 0.8280 seconds. VERBOSE: [APPServer1]: LCM: [ Start Set ] [[SPSearchContentSource]ContentSource_Starmind] VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Setting Content Source Setting for 'Starmind' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Getting Content Source Setting for 'Starmind' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Get-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Importing function 'Test-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving BeginProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving ProcessRecord Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving EndProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving BeginProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving ProcessRecord Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_Starmind] Leaving EndProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: LCM: [ End Set ] [[SPSearchContentSource]ContentSource_Starmind] in 1.7970 seconds. VERBOSE: [APPServer1]: LCM: [ End Resource ] [[SPSearchContentSource]ContentSource_Starmind] VERBOSE: [APPServer1]: LCM: [ Start Resource ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] VERBOSE: [APPServer1]: LCM: [ Start Test ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Testing Content Source Setting for 'Swiss Re Public Website' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Getting Content Source Setting for 'Swiss Re Public Website' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Importing function 'Get-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Importing function 'Test-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: LCM: [ End Test ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] in 0.5320 seconds. VERBOSE: [APPServer1]: LCM: [ Start Set ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Setting Content Source Setting for 'Swiss Re Public Website' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Getting Content Source Setting for 'Swiss Re Public Website' VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Importing function 'Get-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Importing function 'Test-SPDSCSearchCrawlSchedule'. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Executing as the local run as user Domain\setupuser VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of Get-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of New-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of New-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of New-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving BeginProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving ProcessRecord Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] Leaving EndProcessing Method of Set-SPEnterpriseSearchCrawlContentSource. VERBOSE: [APPServer1]: LCM: [ End Set ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite] in 2.5780 seconds. VERBOSE: [APPServer1]: LCM: [ End Resource ] [[SPSearchContentSource]ContentSource_SwissRePublicWebsite]
I'm using this script to configure all website sources:
$SSA = Get-SPEnterpriseSearchServiceApplication $ContentSources = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA
foreach ($cs in $ContentSources) { write-host ("-"*40) write-host ("Content source name: " + $cs.name) if($cs.Type -eq "Web") { if($cs.MaxSiteEnumerationDepth -ne 0 -or $cs.MaxPageEnumerationDepth -ne 2147483647) { $cs.MaxSiteEnumerationDepth = 0 $cs.MaxPageEnumerationDepth = 2147483647 $cs.Update() } } }
Thanks @typozh - will investigate when time allows and see if we can find the fault. Appreciate the information!
Any update on this?
This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.