Skip to content

SPProjectServerLicense

Yorick Kuijs edited this page Jul 10, 2020 · 12 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
InstallAccount Write PSCredential POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

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