Test-TargetResource SPFarm Resource fails to find local SharePoint Server
See original GitHub issueDetails of the scenario you try and problem that is occurring: I am doing a complete setup of a lab environment for SharePoint, including the setup of Active Directory, SQL and SharePoint on one single vm. The configuration is done using Composite Resources and works fine - until the moment where the farm was already created and you rerun the configuration. As soon as DSC reaches the step
VERBOSE: [SHAREPOINTLAB]:[[SPFarm]CreateSPFarm::[LabSharePoint]SPSetup] Leaving BeginProcessing Method of Get-SPServer.
it fails with the error “The server named ‘SHAREPOINTLAB’ does not exist.” (The local server FQDN is SharePointLab.demo.local). The operational eventlog holds the following entry:
This event indicates that a non-terminating error was thrown when DSCEngine was executing Test-TargetResource on MSFT_SPFarm DSC resource. FullyQualifiedErrorId is Microsoft.SharePoint.PowerShell.SPCmdletGetServer. Error Message is The server named ‘SHAREPOINTLAB’ does not exist…
When I just load the SharePoint PSSnapin myself and run Get-SPServer, I get the following result:
Address Role Status
------- ---- ------
SharepointLab.demo.local SingleServerFarm Online
I am not sure what is wrong here, the only thing I can imagine is that SharepointLab != SharepointLab.demo.local ?
The DSC configuration that is using the resource:
SPFarm CreateSPFarm
{
Ensure = "Present"
DatabaseServer = "SharePointLab.demo.local"
FarmConfigDatabaseName = "SP_Config"
Passphrase = $FarmPassPhrase
FarmAccount = $FarmAccount
PsDscRunAsCredential = $InstallAccount
AdminContentDatabaseName = "SP_AdminContent"
RunCentralAdmin = $true
DependsOn = "[SPInstall]InstallSharePoint"
}
Version of the Operating System and PowerShell the DSC Target Node is running: OSVersion: Windows Server 2016 Version 1607 (OS Build 14393.2155) PSVersion: 5.1.14393.2155
Version of SharePoint that is used (e.g. SharePoint 2016): SharePoint 2016
Version of the DSC module you’re using: Version: 2.2.0.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
PR merged, closing issue
Fixed in PR #811