SPSearchTopology doesn't work when NodeName is fully-qualified
See original GitHub issueDetails of the scenario you try and problem that is occurring: Creating a search topology does not work when NodeName is a fully-qualified domain name (e.g. server.domain.com instead of simply server)
In MSFT_SearchTopology.psm1, lines 250-257:
$searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer `
-ErrorAction SilentlyContinue
if ($null -eq $searchService)
{
$domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain
$searchServer = "$searchServer.$domain"
$searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer
}
Can we add a check for FQDN somewhere here? Something like… (edit: had the wrong operator)
if($searchServer -like '*.*') {
$searchServer = $searchServer.Split('.')[0]
}
The DSC configuration that is using the resource: The resource, when called:
SPSearchTopology SearchTopology {
PsDscRunAsCredential = $Node.SetupAccount
ServiceAppName = 'Global Search'
Admin = $AllNodes.Where({ 'Admin' -in $_.SearchRoles }).NodeName
Crawler = $AllNodes.Where({ 'Crawler' -in $_.SearchRoles }).NodeName
ContentProcessing = $AllNodes.Where({ 'ContentProcessing' -in $_.SearchRoles }).NodeName
AnalyticsProcessing = $AllNodes.Where({ 'AnalyticsProcessing' -in $_.SearchRoles }).NodeName
QueryProcessing = $AllNodes.Where({ 'QueryProcessing' -in $_.SearchRoles }).NodeName
IndexPartition = $AllNodes.Where({ 'Index' -in $_.SearchRoles -and $_.IndexPartition -eq 0 }).NodeName
FirstPartitionDirectory = Join-Path -Path $Node.SearchIndexFolder -ChildPath '0'
DependsOn = @('[SPSearchServiceApp]SearchServiceApp','[SPMinRoleCompliance]MinRoleCompliance')
}
Sanitized sample of my PSD1:
@{
AllNodes = @(
@{
NodeName = '*'
SearchIndexFolder = 'D:\Data\Index'
},
@{
NodeName = 'server.subdomain.domain.com'
ServerRole = 'ApplicationWithSearch'
RunCentralAdmin = $true
SearchRoles = @('Admin','Crawler','ContentProcessing','AnalyticsProcessing','QueryProcessing','Index')
IndexPartition = 0
},
}
Version of the Operating System and PowerShell the DSC Target Node is running: Server 2012 R2, Windows PowerShell 5.1
Version of SharePoint that is used (e.g. SharePoint 2016): SharePoint 2016, FP2
Version of the DSC module you’re using: 2.3.0.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
2013 - Search Topology Issues
Verify that all components of the new search topology are running correctly. At the Windows PowerShell command prompt, type the following ...
Read more >Get-SPEnterpriseSearchTopology (sharepoint-server)
This cmdlet retrieves a given search topology, the active search topology, or all search topologies that belong to a given search service application....
Read more >Applications Manager Issues Fixed
Applications Manager Issues Fixed. This page lists the issues resolved and minor feature enhancements made in the following releases: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great suggestion. Have implemented this fix, will be included in my next PR
Closed via PR #850