Introduction
Note: All related files and scripts can be found on this page.
- Easily compute the machine code on the end user device.
- Automatically go through the list and activate all the devices.
Computing the machine code
In order to obtain the machine code of the current machine, IT dept can run a script that obtains the machine code and friendly name of the device.PowerShell script
Themachinecodescript.ps1
PowerShell script gives the same result as calling Helpers.GetMachineCodePI() in the .NET client library. The script will also append the machine name next to the machine code.
In order to run this script, they may need to change the execution policy to “remote signed”, which can be done with the following command:
removesigned
, you can use the cmd script below:
Cmd script
Themachinecodescriptsha256.bat
cmd script gives the same result as calling Helpers.GetMachineCodePI(v:2) in the .NET client library. The same machine code will also be generated in the Python client, provided that Helpers.GetMachineCode is called with v=2
.
Verifying the license key
In the key verification example, we use Activate to verify a license. This method will automatically activate new machines, as long as the max number of machines limit has not been reached. To prevent activation of new machines, GetKey method can be used instead. It is called with the same parameters as Activate. The machine code parameter does not need to be provided.Note: when using GetKey, it is important to check that the license key is not blocked. Activate does that by default, but when using GetKey, it needs to be done on the client side.