Striving hard to make it easier for folks to get started with SharePointDSC, we are making changes in our documentation to categorize every resource within the module into 4 main categories:
- Common: Resources that needs to be defined on every node in the farm with the same values for each parameters. This category includes resources such as SPInstall and SPInstallPrereqs which are responsible for installing the binaries on the server. These need to be installed on every server in a SharePoint farm, and therefore need to be defined on every node in the configuration with the same parameters’ values.
- Distributed: This category includes the major part of the resources in the module. Distributed resources should only appear on one node in the configuration. Identify one of the node in your farm to be the master node and define all the Distributed resources on it. SharePoint being a distributed system in nature, it uses databases in the back-end to store artefacts and make them available to all servers in the farm. If Distributed resources were to be defined on more then one node, each node would write the same entries back to the database, overwriting one another, or triggering unnecessary Test-TargetResource calls which can affect performance. To better explain this concept, think about how we currently create a new SharePoint Web Application using PowerShell today; we would use the New-SPWebApplication cmdlet. You would log to one server in the farm, and run that cmdlet from there. You would not got on every single server in the farm and run the cmdlet. The same concept applies to SharePointDSC. The key take away from this change in documentation is that Distributed resources should never appear on more than one node in the configuration!
- Specific: Specific resources need to be defined on every node in the farm, but which will most likely have different parameters’ values. For example, the SPFarm resource needs to be defined on every node in order for the servers to be joined to the farm, but each server can have different values for the RunCentralAdministration and ServerRole parameters.
- Utility: These resources do not create or configure an actual artefact on the farm, they simply execute a sanity check or trigger an external process. For example, the SPConfigWizard is the equivalent of running PSConfig on the server. Defining this resource in your configuration does not create anything, it simply launches that external process.
the following table shows the classification of every resources in SharePointDSC as of release 18.104.22.168:
These changes in documentation will officially made public with the release of SharePointDSC 22.214.171.124 scheduled to be released on May 2nd 2018.