Programatically Export the XProtect license request

Large systems that stay offline can sometimes be hard to manage. To guarantee that devices don’t go past their activation period, we would like a way to be able to automatically export the license requests from several different sites and send them to a central location so that a team can do the license activations more quickly.

Hi Eric,

We have some limited licensing capabilities in the 2020 R2 MIP SDK available through Configuration API but I don’t believe it allows you to export a license request yet. Hopefully the full functionality will be available in later versions, or if this is possible already, maybe @Peter Posselt Vergmann (Milestone Systems)​ or someone can correct me?

The following workaround is unsupported and undocumented but possible to do using one of the WCF services hosted by the Management Server. This is done through PowerShell / MilestonePSTools but you can instantiate your own IServerProxyService client via C#. Again, since the IServerProxyService interface is not a part of the MIP SDK, it’s subject to breaking changes between versions so use it at your own risk.

$proxy = Get-IServerProxyService
[System.IO.File]::WriteAllBytes("C:\temp\license.lrq", $proxy.GetLicenseRequestFromConfiguration())

Hi Eric,

I will have to correct Josh here (sorry Josh :slight_smile: ). The license enhancements added to Config API with XProtect 2020 R2 do indeed include support for exporting license requests (and importing the resulting license). You can easily check it out with the Config API client (select License Information and then the product name).

/Peter

Thanks guys!