dsccommunity / dsccommunity/RemoteDesktopServicesDsc
`RDLicenseConfiguration`: No way to licence RDS
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 36
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
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 StopApplies 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Start by reviewing the existing RDLicenseConfiguration resource and the RDS:LicenseServer location, then compare its needs with Win32_TSLicenseKeyPack and InstallAgreementLicenseKeyPack. Done requires a defined set of resource properties and a confirmed approach for applying and activating the license.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100