The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.
As this solution reads RDS License server data and builds the list of users and devices along with their allocated RDS licenses. The second step is a Business Adapter that allocates users to licenses and optimal licenses using direct SQL.
The solution requires advanced skills to understand and modify the SQL code.
The SQL involved in the “compute allocations” step requires to be adapted to the customer’s environment. For instance, if you have only maintained Microsoft User CALs, there is no need to check if a user was provided CALS of lower version… The SQL script “optimization portion” can just be skipped.
SOLUTIONS ARE PROVIDED ON AN "AS IS" BASIS. NEITHER FLEXERA NOR ITS SUPPLIERS MAKE ANY WARRANTIES, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. LICENSEE MAY HAVE OTHER STATUTORY RIGHTS. HOWEVER, TO THE FULL EXTENT PERMITTED BY LAW, THE DURATION OF STATUTORILY REQUIRED WARRANTIES, IF ANY, WILL BE LIMITED TO THE SHORTER OF (I) THE STATUTORILY REQUIRED PERIOD OR (II) THIRTY (30) DAYS FROM LICENSEE’S ACCEPTANCE OF THE AGREEMENT.
This document gives the details for setting up a RDS Management solution that allows to collect automatically the RDS license server reports from each license server, and re import the data into FNMS / Flexera one, with allocations of users to RDS CALs licenses (current consumption) and Allocations of users to RDS Optimal licenses, applying a de duplication optimization logic.
The audience is Flexera or Flexera partner’s consultants or customers implementers with advanced SQL skills.
A PowerShell script (Query_and_Import_TSE-RDS_Licenses_From_TSLicenseServers.ps1):
This PowerShell file can be found in the .\RDS Licenses\Query folder of the embedded zip file below and can be scheduled with a Windows Server scheduled task
List_All_Rds_Cals.csv
List_All_KeyPack.csv
The full version of the Business Adapter is necessary as the next two Business Adapters feed the tables of a staging SQL database running SQL queries, but the solution works on FNMS Cloud / Flexera One
The AllRdsCalLicensesUsedFromTSServers.xml importer Imports into a staging database the RDS CALs details, with all key details first.
The BAS import uses the “Use physical tables” options that you can activate only with the full version of the Business Adapter Studio
“View advanced options” must be set to configure the use of a physical table.
There are two possibilities for this “physical table” location:
The AllRdsKeyPackFromTSServers.xml import needs to be run or scheduled after the AllRdsCalLicensesUsedFromTSServers.xml business adapter as it uses, in the SQL step, data that has been imported or refreshed by this first Business Adapter. This second import has two steps:
The logic of optimal consumptions calculation is the following:
The business adapter reads data and creates a raw RDS CALs definition table ([dbo].[ECMImport_AllRdsKeyPackFromTSServers]) and has two SQL steps, to create a second table (nr_RDSAllocations). This table stores the “joined” information (users RDS CALs and CALs name) and the calculated allocation or optimal allocations.
It is recommended that you test the SQL code directly in SQL Server Management Studio after running the first and second importer that will load the raw RDS CAL data in the tables… then, you can paste the code from the “PopulateAllocationData” Business Adapter SQL step to understand what it does and tune it eventually.
SELECT * FROM nr_RDSAllocations will show you the full data.
This SQL code contains comments.
Customers with a Cloud instance need to import the user to device link information from a SOAP API (GetCustomViewResult) or REST API (ReportExecute)
The ***Optimization section***can be tuned or ignored if the goal is to reflect the RDS licenses assigned to users and devices (current consumption) and not to identify potential optimizations.
The Beacon version (Cloud instance or on premises) of the Business adapter can be used to run the next two importers. You need to paste the two xml files in the beacon BAS folder (normally: C:\ProgramData\Flexera Software\Beacon\BusinessAdapter)
The Scheduled_LICENSE_Clear Previous MS RDS CAL Allocations.XML Business importer needs to be scheduled the next Business Adapter and cleans up all previous allocations from all RDS licenses. If your CAL data has allocations for all licenses, the update rule (“detach unfound computers (and users) from…”) will ensure the licenses have the current users and devices allocated. However, if a CAL is missing from the source data, no allocation will be created or deleted. Hence this safe “cleanup” step.
Scheduled_LICENSE_Allocate MS RDS CALs.XML that reads nr_RDSAllocations SQL table and performs allocations:
The difference between the RDS license consumptions and the RDS Optimal license consumption shows the saving that could be obtained through rationalization of RDS license allocations in the license servers.
The PowerShell script will be run from the beacons that are querying the Active Directory that contains the RDS license servers list… to then query each of the RDS servers and store the data into a local SQL db for processing.
The following preparation steps are necessary:
The code can be found in embedded files attached to this article.
Example of the staging database content that converts the RDS CAL servers information into allocations and optimal allocations
Aug 30, 2023 09:44 AM - edited Aug 30, 2023 09:50 AM
Hi Nicolas,
Great work thank you! Can you please share the code and xls? At this moment these are pictures.
Also you mentioned: Create a service user that will have the appropriate rights. Can you please be more specific?
Regards
Ronald
Hello @Ronny_OO7 / Ronald,
Everything is in the attached docx file! Regarding the Services user, to be honest, you need a use that has the rights to query the RDS License server APIs... but in reality, I have never struggled with this one (using the Flexera Service Account).
A topic that is trickier is: "which ports to open?". With some customers, there was nothing to do, with some other, some ports needed to be opened. Reading I have a feeling port 135 needs to be opened.
@jdempsey may have more input on this. Jim, would you have information?
Thanks,
Nicolas
such articles are more then helpful 😉 more of these 😉