Skip to content

Understanding Resources

dscbot edited this page Feb 11, 2022 · 4 revisions

Resource Types

Common 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.

Specific Resources

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.

Distributed Resources

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

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 .

Available resources

The SharePointDsc module includes the following DSC resources

Resource Type Requires CredSSP
SPAccessServiceApp Distributed -
SPAccessServices2010 Distributed -
SPAlternateUrl Distributed -
SPAntivirusSettings Distributed -
SPAppCatalog Distributed Yes
SPAppDomain Distributed -
SPAppManagementServiceApp Distributed -
SPAppStoreSettings Distributed -
SPAuthenticationRealm Distributed -
SPAzureAccessControlServiceAppProxy Distributed -
SPBCSServiceApp Distributed -
SPBlobCacheSettings Specific -
SPCacheAccounts Distributed -
SPCertificate Distributed -
SPCertificateSettings Distributed -
SPConfigWizard Utility -
SPContentDatabase Distributed -
SPDatabaseAAG Distributed -
SPDesignerSettings Distributed -
SPDiagnosticLoggingSettings Distributed -
SPDiagnosticsProvider Distributed -
SPDistributedCacheClientSettings Distributed -
SPDistributedCacheService Specific -
SPDocIcon Common -
SPExcelServiceApp Distributed -
SPFarm Specific -
SPFarmAdministrators Distributed -
SPFarmPropertyBag Distributed -
SPFarmSolution Distributed -
SPFeature Distributed -
SPHealthAnalyzerRuleState Distributed -
SPIncomingEmailSettings Distributed -
SPInfoPathFormsServiceConfig Distributed -
SPInstall Common -
SPInstallLanguagePack Common -
SPInstallPrereqs Common -
SPIrmSettings Distributed -
SPLogLevel Distributed -
SPMachineTranslationServiceApp Distributed -
SPManagedAccount Distributed -
SPManagedMetaDataServiceApp Distributed -
SPManagedMetaDataServiceAppDefault Distributed -
SPManagedPath Distributed -
SPMinRoleCompliance Utility -
SPOAppPrincipalMgmtServiceAppProxy Distributed -
SPOfficeOnlineServerBinding Distributed -
SPOfficeOnlineServerSupressionSettings Distributed -
SPOutgoingEmailSettings Distributed -
SPPasswordChangeSettings Distributed -
SPPerformancePointServiceApp Distributed -
SPPowerPointAutomationServiceApp Distributed -
SPProductUpdate Common -
SPProjectServerAdditionalSettings Distributed -
SPProjectServerADResourcePoolSync Distributed -
SPProjectServerGlobalPermissions Distributed -
SPProjectServerGroup Distributed -
SPProjectServerLicense Distributed -
SPProjectServerPermissionMode Distributed -
SPProjectServerServiceApp Distributed -
SPProjectServerTimeSheetSettings Distributed -
SPProjectServerUserSyncSettings Distributed -
SPProjectServerWssSettings Distributed -
SPPublishServiceApplication Distributed -
SPQuotaTemplate Distributed -
SPRemoteFarmTrust Distributed -
SPSearchAuthoritivePage Distributed -
SPSearchContentSource Distributed -
SPSearchCrawlerImpactRule Distributed -
SPSearchCrawlMapping Distributed -
SPSearchCrawlRule Distributed -
SPSearchFileType Distributed -
SPSearchIndexPartition Distributed -
SPSearchManagedProperty Distributed -
SPSearchMetadataCategory Distributed -
SPSearchResultSource Distributed -
SPSearchServiceApp Distributed -
SPSearchServiceSettings Distributed -
SPSearchTopology Distributed -
SPSecureStoreServiceApp Distributed -
SPSecurityTokenServiceConfig Distributed -
SPSelfServiceSiteCreation Distributed -
SPService Distributed -
SPServiceAppPool Distributed -
SPServiceAppProxyGroup Distributed -
SPServiceAppSecurity Distributed -
SPServiceIdentity Distributed -
SPServiceInstance Specific -
SPSessionStateService Distributed -
SPShellAdmins Distributed -
SPSite Distributed -
SPSitePropertyBag Distributed -
SPSiteUrl Distributed -
SPStateServiceApp Distributed -
SPSubscriptionSettingsServiceApp Distributed -
SPTimerJobState Distributed -
SPTrustedIdentityTokenIssuer Distributed -
SPTrustedIdentityTokenIssuerProviderRealms Distributed -
SPTrustedRootAuthority Distributed -
SPTrustedSecurityTokenIssuer Distributed -
SPUsageApplication Distributed -
SPUsageDefinition Distributed -
SPUserProfileProperty Distributed -
SPUserProfileSection Distributed -
SPUserProfileServiceApp Distributed -
SPUserProfileServiceAppPermissions Distributed -
SPUserProfileSyncConnection Distributed -
SPUserProfileSyncService Specific Yes
SPVisioServiceApp Distributed -
SPWeb Distributed -
SPWebAppAuthentication Distributed -
SPWebAppBlockedFileTypes Distributed -
SPWebAppClientCallableSettings Distributed -
SPWebAppGeneralSettings Distributed -
SPWebAppHttpThrottlingMonitor Distributed -
SPWebApplication Distributed -
SPWebApplicationAppDomain Distributed -
SPWebApplicationExtension Distributed -
SPWebAppPeoplePickerSettings Distributed -
SPWebAppPermissions Distributed -
SPWebAppPolicy Distributed -
SPWebAppPropertyBag Distributed -
SPWebAppProxyGroup Distributed -
SPWebAppSiteUseAndDeletion Distributed -
SPWebAppSuiteBar Distributed -
SPWebAppThrottlingSettings Distributed -
SPWebAppWorkflowSettings Distributed -
SPWordAutomationServiceApp Distributed -
SPWorkflowService Distributed -
SPWorkManagementServiceApp Distributed -

Using the Script resource in configurations with SharePointDsc

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.

Clone this wiki locally