Skip to content

Problem with MSFT_SPDistributedCacheService about $currentServer = "$currentServer.$domain" #1468

@Memoi

Description

@Memoi

Problem description

The problem is in file MSFT_SPDistributedCacheService.psm1 at line 208 we have this $currentServer = "$currentServer.$domain" without check if the value of $currentServer is already with FQDN so in my case of course the name of my servers in my config file are with FQDN so the SP Distributed Cache can't start because in the execution of the script the domain name is doubled.

Verbose logs

WARNING: [XXXAPP28T]:                            [[SPDistributedCacheService]EnableDistributedCache] Server XXXAPP28T.domain.DOMAIN is not running distributed cache after waiting 30 minutes. No
longer waiting for this server, progressing to next action

DSC configuration

SPDistributedCacheService EnableDistributedCache
		{
			Name                 = "AppFabricCachingService"
			CacheSizeInMB        = 8192
			ServiceAccount       = $ConfigurationData.NonNodeData.ServiceAccounts.SapoolAccount
			ServerProvisionOrder = @(($AllNodes.Where{$_.SPRole -eq 'DistributedCache'}.NodeName)[1], ($AllNodes.Where{$_.SPRole -eq 'DistributedCache'}.NodeName)[0])
			CreateFirewallRules  = $false
			PsDscRunAsCredential = $serviceAccounts.SPSetupAccount
		}

Suggested solution

Check inf file MSFT_SPDistributedCacheService.psm1 if the value of $currentServer contain (Get-CimInstance -ClassName Win32_ComputerSystem).Domain, if not add it if yes continue.

SharePoint version and build

SP SE CU October 2025

Operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.20348.4294
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.4294
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

SharePointDsc version

5.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions