Skip to content

xRDLicenseConfiguration: No way to licence RDS #64

@bendunne

Description

@bendunne

Description

This DSC resource doesn't contain a method to license RDS, which is a key bit missing from this collection of DSC resources as well as the Certificate assignment mentioned in #63.

Looking into a method to do this for my own environment in PowerShell, I used a mixture for the RDS:LicenseServer location and using the WMI/CIM class Win32_TSLicenseKeyPack to apply the license and activate.

Here is an example of activating using the method InstallAgreementLicenseKeyPack for this particular type of license.

Set-Location RDS:LicenseServer -ErrorAction Stop

Set-Item .\Configuration\FirstName -Value "Test" -ErrorAction Stop
Set-Item .\Configuration\LastName -Value "Test" -ErrorAction Stop
Set-Item .\Configuration\Company -Value "Test" -ErrorAction Stop
Set-Item .\Configuration\CountryRegion -Value "Test" -ErrorAction Stop
Set-Item .\ActivationStatus -Value 1 -ConnectionMethod AUTO -Reason 5 -ErrorAction Stop

Applies License

$Argumentlist =@(
4, # AgreementType
9999, # LicenseCount
1, # ProductType
5, # ProductVersion
$agreementnumber # AgreementNumber
)

$InstallLicenseKey = Invoke-WmiMethod -Namespace "root/cimv2" -Class Win32_TSLicenseKeyPack -Name InstallAgreementLicenseKeyPack -ArgumentList $Argumentlist

Adds the license server to the Terminal Server License Servers group on the domain controller (Run as Enterprise Admin)

Set-Item -Path RDS:\LicenseServer\LSinTSLSGroup -Value 1 -ErrorAction Stop

Proposed properties

I'm not really sure this can vary wildly depending on the type of License you trying to apply.

Special considerations or limitations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions