Partager via


Create CAL reports

Updated: November 14, 2011

Applies To: Windows Server 2003, Windows Server 2008, Windows Server 2008 R2

Depending on the operating system on the terminal server, RD Session Host server, or license server, there are various options available to generate a report of client access license (CAL) usage. Note that terminology has changed somewhat per version.

Client access license reports by version

Windows Server 2003

CAL Type Description General Syntax

Terminal Services Device client access licenses (TS Device CALs)

Use the Terminal Services Licensing Reporter Tool (LSReport.exe, available in the Windows 2000 Server Resource Kit) to get detailed information about the TS Device CALs that are issued (basic information is visible in the TS Licensing MMC snap-in). The tool connects to the database on the Windows Server 2003 license server to obtain the following information: Server, License ID, Keypack ID, Client, User, Start Date, End Date, Issue Type, License Type

lsreport.exe /f c:\report.txt [licenseservername1], [licenseservername2], …

Terminal Services User client access licenses (TS User CALs)

Generate a Per User CAL report by using the PerUserCALReport.vbs script (available on TechNet Script Center) to get the usage trend of TS User CALs for a given domain. The script connects to the Windows Server 2003 terminal servers in the domain to obtain the information; administrative rights on the target terminal server are required. This script can be scheduled to run at regular intervals by using PerUserCALReportScheduler.vbs to get a trend.

cscript PerUserCALReport.vbs /W2K3 [domainFQDN]

Windows Server 2008

CAL Type Description General Syntax

Terminal Services Per Device client access licenses (TS Per Device CALs)

Generate Per Device license usage reports for Terminal Services license servers running Windows Server 2008 by using the GeneratePerDeviceReport.vbs script to get detailed information about the TS Per Device CALs that are issued. The script connects to the Terminal Services license server by using WMI and obtains the following information: License ID, KeyPack ID, IssuedToMachine, HWID, Expiry Date

cscript GeneratePerDeviceReport.vbs -Server [servername]

Terminal Services Per User client access licenses (TS Per User CALs)

To generate a report for TS Per User CALs usage for Windows Server 2008, use one of the following: The Per User License Usage Report available through TS Licensing Manager, or the PerUserCALReport.vbs script (TechNet Script Center).

Windows Server 2008 R2

CAL Type Description General Syntax

Remote Desktop Services Per Device client access licenses (RDS Per Device CALs)

Generate Per Device license usage reports for license servers running Windows Server 2008 R2 by using the GeneratePerDeviceReport.vbs script to get detailed information about the RDS Per Device CALs that are issued. The script connects to the Remote Desktop license server by using WMI, and obtains the following information: License ID , KeyPack ID, IssuedToMachine, HWID, Expiry Date

cscript GeneratePerDeviceReport.vbs -Server [servername]

Remote Desktop Services Per User client access licenses (RDS Per User CALs)

To generate a report for RDS Per User CALs usage for Windows Server 2008 R2, use one of the following: The Per User License Usage Report available through RD Licensing Manager, the PerUserCALReport.vbs script (TechNet Script Center), or the Remote Desktop Services provider for Windows PowerShell.

Generating Per User CAL reports

Use these resources to generate the reports.

Generating a report by using Licensing Manager

Windows Server 2008 and Windows Server 2008 R2 provide a convenient way to generate the Per User CAL report by using TS Licensing Manager or RD Licensing Manager. You can generate a report against the host domain of a license server, a given organizational unit (OU), or all trusted domains.

Generating a report by using the PerUserCALReport.vbs script

You can generate a Per User CAL report by using the PerUserCALReport.vbs script (available on TechNet Script Center) to report on Per User CALs issued to a user in a domain with the Windows Server 2008 or Windows Server 2008 R2 schema extension and a license server. This script connects to Active Directory to obtain the information.

General Syntax: cscript PerUserCALReport.vbs /W2K8 [domainFQDN]

Generating a report by using the Remote Desktop Services Provider for Windows PowerShell

You can use the Remote Desktop Services provider for Windows PowerShell to generate the RDS Per User CAL report for Windows Server 2008 R2.

To generate a report:

  1. Run PowerShell elevated.

  2. Run the command: import-module RemoteDesktopServices

  3. Run the command: set-location RDS:

  4. Run the command: new-item -path RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports -Scope DOM -Name

  5. This will generate a container within the PerUserLicensereports.

  6. Switch to RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports\[ReportName]\Win2k8-Win2k8R2\Issuedlicenses

  7. Run the command: get-item RDS:\LicenseServer\IssuedLicenses\PerUserLicenseReports\[ReportName]\Win2k8-Win2k8R2\Issuedlicenses\*

Additional references