Skip to content

SPMinRoleCompliance

Yorick Kuijs edited this page Jul 10, 2020 · 11 revisions

SPMinRoleCompliance

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes' Yes
State Required String Should the state be set to compliant Compliant, NonCompliant
InstallAccount Write PSCredential POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

Type: Utility Requires CredSSP: No

This resource will help manage compliance of MinRole based servers. Each time the resource runs it will investigate which service instances should be running based on the role of servers anywhere in the farm, and if they are not in a compliant state it will tell SharePoint to create timer jobs to make the necesssary modifications to make the farm compliant again.

Examples

Example 1

This example shows how to ensure the farm is always compliant with MinRole settings

    Configuration Example
    {
        param(
            [Parameter(Mandatory = $true)]
            [PSCredential]
            $SetupAccount
        )
        Import-DscResource -ModuleName SharePointDsc

        node localhost {
            SPMinRoleCompliance MinRoleCompliance
            {
                IsSingleInstance     = "Yes"
                State                = "Compliant"
                PSDscRunAsCredential = $SetupAccount
            }
        }
    }
Clone this wiki locally