However, the SharePoint snapin isn't available at that time, resulting in the following error:
PowerShell DSC resource MSFT_SPShellAdmins failed to execute Test-TargetResource functionality with error message: The term 'Get-SPDatabase' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. "},
Problem description
The SPShellAdmins resource is calling the function "Get-SPDscDatabaseOwnerList". This function is executing this command:
However, the SharePoint snapin isn't available at that time, resulting in the following error:
Verbose logs
DSC configuration
Suggested solution
In MSFT_SPShellAdmins.psm1 replace
with
and in SPShellAdmin.psm1 replace
with
SharePoint version and build
Operating system the target node is running
PowerShell version and build the target node is running
SharePointDsc version