Skip to content

SPProjectServerADResourcePoolSync

dscbot edited this page Mar 17, 2023 · 12 revisions

SPProjectServerADResourcePoolSync

Parameters

Parameter Attribute DataType Description Allowed Values
Url Key String The default zone URL of the Project site to set permissions for
GroupNames Write StringArray[] The names of groups in the current domain to sync resources from
Ensure Write String Should the resource sync process be present or absent for this site? Present, Absent
AutoReactivateUsers Write Boolean Should inactive users found in sync be automatically reactiviated?

Description

Type: Distributed Requires CredSSP: No

This resource is used to control the settings of the Active Directory resource pool sync for Project Server, for a specific PWA instance. You can control which AD groups should be imported from and control settings about reactivitating users.

NOTE: The schedule for this import is controlled via a standard SharePoint server timer job, and as such it can be controlled with the SPTimerJobState resource. Below is an example of how to set this resource to run the AD import job daily. The name of the job here may change if you have multiple Project Server service apps in the same farm.

SPTimerJobState RunProjectSeverADImport
{
    Name                    = "ActiveDirectorySync"
    Enabled                 = $true
    Schedule                = "daily between 03:00:00 and 03:00:00"
    PsDscRunAsCredential    = $SetupAccount
}

Examples

Example 1

This example enables Project Server AD resource pool sync

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerADResourcePoolSync EnableSync
        {
            Ensure               = "Present"
            Url                  = "http://projects.contoso.com/pwa"
            GroupNames           = @("DOMAIN\Group 1", "DOMAIN\Group 2")
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example disables Project Server AD resource pool sync

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerADResourcePoolSync EnableSync
        {
            Ensure               = "Absent"
            Url                  = "http://projects.contoso.com/pwa"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally