Archive for the ‘Windows Server’ Category

I had an issue where Microsoft had issued a TS license pack key that had way too many licenses in it versus what was actually purchased through the CSP portal and I needed to remove some additional per user RDS licenses.

I had mixed results when trying to remove, and a lot of the information on the web I found was mainly for device CALS and not the user ones i needed to remove.

In the end I found a way to remove RDS CALS on Server 2016 (this will work on other server os’ too)

This command below displays the licensing info:

PS C:\Windows\system32> Get-WmiObject Win32_TSLicenseKeyPack|Select KeyPackId, ProductVersion, TotalLicenses, TypeAndModel|Format-List

KeyPackId      : 2

ProductVersion : Windows 2000 Server

TotalLicenses  : 4294967295

TypeAndModel   : Built-in TS Per Device CAL

KeyPackId      : 3

ProductVersion : Windows Server 2016

TotalLicenses  : 5

TypeAndModel   : RDS Per User CAL

KeyPackId      : 4

ProductVersion : Windows Server 2016

TotalLicenses  : 500

TypeAndModel   : RDS Per User CAL

This command below is what actually removes 495 licenses from keypack 4 ID

Invoke-WmiMethod -Class Win32_TSLicenseKeyPack -Name RemoveLicensesWithIdCount -ArgumentList 4,495

__GENUS          : 2

__CLASS          : __PARAMETERS

__SUPERCLASS     :

__DYNASTY        : __PARAMETERS

__RELPATH        :

__PROPERTY_COUNT : 1

__DERIVATION     : {}

__SERVER         :

__NAMESPACE      :

__PATH           :

ReturnValue      : 0

PSComputerName   :

Re-run the command to check and confirm the licenses have been removed from the targetted keypack ID.

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

KeyPackId      : 2

ProductVersion : Windows 2000 Server

TotalLicenses  : 4294967295

TypeAndModel   : Built-in TS Per Device CAL

KeyPackId      : 3

ProductVersion : Windows Server 2016

TotalLicenses  : 5

TypeAndModel   : RDS Per User CAL

KeyPackId      : 4

ProductVersion : Windows Server 2016

TotalLicenses  : 5

TypeAndModel   : RDS Per User CAL

 

The client log files for different CM components are located in the %WINDIR%\System32\CCM\Logs folder (x86) or  in %WINDIR%\SysWOW64\CCM\Logs ( x64 OS).

 

The config manager server log files are located in the C:\Program Files (x86)\Microsoft Configuration Manager\Logs or SMS_CCM\Logs folder , these are handy to see what’s happening when trouble shooting pxe deployment issues or to view other logs. I use CM trace or SMS trace to make viewing logs easier.

 

For servers the IIS logs can be found in %WINDIR%\System32\logfiles\W3SVC1