Check RD License information
To check license information please open RD Licensing Manager (licmgr.exe). If you do not have a RD Licensing server then you need to install the RD Licensing Role Service using Server Manager and then use RD Licensing Manager to Activate it and install your purchased RDS CALs.
For Per Device RDS CALs you can see which devices have been issued licenses, when they expire, installed licenses, etc. For Per User RDS CALs you must right-click on the server name and choose Create Report–Per User CAL Usage, create the report, in the left pane select the server name and then Reports, then finally right-click on the Report you just created in the right pane and choose Save As to save it as a .csv file. You can open the csv file in Notepad to view issued Per User CALs, total, expiration dates, etc.
Please verify that you have Specified your RD Licensing server in RD Session Host Configuration (tsconfig.msc) and that you have set your Licensing mode to match the type of purchased RDS CALs that you have.
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays