Skip to content

SPProjectServerLicense

dscbot edited this page Mar 17, 2023 · 11 revisions

SPProjectServerLicense

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes' Yes
Ensure Write String Should a Project Server license be enabled or disabled Present, Absent
ProductKey Write String What is the product key for Project Server

Description

Type: Distributed Requires CredSSP: No

This resource is used to enable a Project Server license in to a SharePoint 2016 or 2019 farm.

Examples

Example 1

This example enables Project Server in the current environment

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerLicense ProjectLicense
        {
            IsSingleInstance     = "Yes"
            ProductKey           = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example disables Project Server in the current environment

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPProjectServerLicense ProjectLicense
        {
            IsSingleInstance     = "Yes"
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally