Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xRDLicenseConfiguration: No way to licence RDS #64

Open
bendunne opened this issue Aug 30, 2019 · 2 comments
Open

xRDLicenseConfiguration: No way to licence RDS #64

bendunne opened this issue Aug 30, 2019 · 2 comments

Comments

@bendunne
Copy link
Contributor

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

@danielboth
Copy link
Member

Creating a proper resource for this is a tough one, as there are quite a bit of different options and I don't have access to all the different licenses to test them. Still, if anyone is open to create an initial version that just covers one of the licensing methods, I'm open to get that merged.

@NemoDima
Copy link

@danielboth can I provide an example of using RDS licensing using Enterprise agreement?
Does it help you to add/create proper functionality for this case?
Best wishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants