-
Notifications
You must be signed in to change notification settings - Fork 107
Understanding Resources
These resources need to be defined within every node in the farm. The parameters specify for the resources associated with Common Resources should be the same for each server (e.g. the same language packs need to be installed on all servers in the farm). As an example, the SPInstall resource, which installs the SharePoint binaries on a server, needs to be present within every node in the farm. It is not enough to have only one server with the binaries installed on in a multi-server farm. Common Resources are identified in the list below with the mention Common.
Just like the Common Resources, the Specific Resources need to be included within every node in the farm. Their only difference, compare to Common Resources, is that the resources' parameters may differ from one node to another in the farm. As an example, the SPServiceInstance resource, which allows us to enable specific services on a SharePoint Server, will be specified for each server in the farm, but with different "Ensure" value to allow certain services to be started on specific servers, but not on others. Specific Resources are identified in the list below with the mention Specific.
This category covers the major part of the resources. Distributed Resources should ONLY be defined within ONE node in the farm. As the name states it, those are distributed which means that resources of this type are normally stored in a central database. Specifying these resources on more than one node in the farm may introduce unexpected behaviors (race condition, performance issues, etc.). For example, if you wanted to create a new Web Application using the traditional PowerShell approach, you would pick one server and run the New-SPWebApplication cmdlet on it, you would not run it on each of the servers in the farm. To define these resources, identify one server in your configuration (e.g. the first server to create/join the farm), and define all the Distributed Resources within it. Distributed Resources are identified in the list below with the mention Distributed.
Utility Resources are resources that do not generate an artefact per say. Their sole purpose is to help you initiate a check or apply a patch. As an example, the SPMinRoleCompliance resource simply returns true or false (in its Test-TargetResource function) if the services running on a server correspond to the services that are associated with its assigned MinRole. It does not enable, disable or even create any service instances. Utility Resources are identified in the list below with the mention Utility .
The SharePointDsc module includes the following DSC resources
Check-out this article if you want to use the Script resource to implement custom functionality that is not included in SharePointDsc.
Of course you can also create an issue in the issue list to request the functionality to be added. Sharing code that you already have will greatly speed up the development effort.
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations