Skip to content

SPProjectServerServiceApp

dscbot edited this page Mar 17, 2023 · 11 revisions

SPProjectServerServiceApp

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The name of the service application
ApplicationPool Required String The name of the application pool to run the service app in
ProxyName Write String The name of the Project Server Service Application Proxy
Ensure Write String Present if the service app should exist, absent if it should not Present, Absent

Description

Type: Distributed Requires CredSSP: No

This resource is responsible for provisioning and managing the Project Server service application in SharePoint Server 2016 or 2019.

To create a Project Server site the following DSC resources can be used to create the site and enable the feature.

SPSite PWASite
{
    Url                      = "http://projects.contoso.com"
    OwnerAlias               = "CONTOSO\ExampleUser"
    HostHeaderWebApplication = "http://spsites.contoso.com"
    Name                     = "PWA Site"
    Template                 = "PWA#0"
    PsDscRunAsCredential     = $SetupAccount
}

SPFeature PWASiteFeature
{
    Name                 = "PWASITE"
    Url                  = "http://projects.contoso.com"
    FeatureScope         = "Site"
    PsDscRunAsCredential = $SetupAccount
    DependsOn            = "[SPSite]PWASite"
}

Examples

Example 1

This example shows how to create a new project server services service app in the local farm

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerServiceApp ProjectServiceApp
        {
            Name                 = "Project Server Service Application"
            ApplicationPool      = "SharePoint Web Services"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example shows how to remove a project server service app in the local farm. The ApplicationPool property is still required but is not used when removing, so the value used here doesn't matter.

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerServiceApp ProjectServiceApp
        {
            Name                 = "Project Server Service Application"
            ApplicationPool      = "n/a"
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally