Skip to content

SPProjectServerLicense

Yorick Kuijs edited this page Dec 27, 2017 · 12 revisions

SPProjectServerLicense

Parameters

Parameter Attribute DataType Description Allowed Values
Ensure Key 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

This resource is used to enable a Project Server license in to a SharePoint 2016 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
        {
            Ensure               = "Present"
            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
        {
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Clone this wiki locally