Archive for the ‘RDS’ Category

Check number of CAL’s:

Get-WmiObject Win32_TSLicenseKeyPack|Select KeyPackId, ProductVersion, TotalLicenses, TypeAndModel|Format-List

Reduce number of CAL licences:

Invoke-WmiMethod -Class Win32_TSLicenseKeyPack -Name RemoveLicensesWithIdCount -ArgumentList <KeyPackId>,<NumberOfCALsToRemove>

example:
if the KeyPackId is 6
you want to reduce the license count by 20,
you would enter :

Invoke-WmiMethod -Class Win32_TSLicenseKeyPack -Name RemoveLicensesWithIdCount -ArgumentList 6,20

Verify:

Get-WmiObject Win32_TSLicenseKeyPack|Select KeyPackId, ProductVersion, TotalLicenses, TypeAndModel|Format-List