Collecting Machine IDs

Each licence key is tied to one computer's Machine ID, a 16-character code such as K7QD-2MXA-PL4R-T9ZE. Order by uploading a CSV with two columns: PcName and MachineId.

One computer

Run mcz license, or open MCZ and click Licence.... The Machine ID is shown there.

Many computers

Download Get-MczMachineId.ps1. It computes the same ID as MCZ, without MCZ installed and without admin rights.

# This PC
.\Get-MczMachineId.ps1

# A list of PCs over PowerShell remoting
.\Get-MczMachineId.ps1 -ComputerName (Get-Content .\pcs.txt) -OutFile .\machines.csv

# Every PC in an OU (needs the ActiveDirectory module)
$pcs = Get-ADComputer -SearchBase "OU=Workstations,DC=corp,DC=example" -Filter * | ForEach-Object Name
.\Get-MczMachineId.ps1 -ComputerName $pcs -OutFile .\machines.csv

# GPO startup script / Intune: each PC drops <PCNAME>.csv on a share, then merge
.\Get-MczMachineId.ps1 -OutDirectory \\fileserver\mcz$\ids
Get-ChildItem \\fileserver\mcz$\ids\*.csv | Import-Csv | Export-Csv .\machines.csv -NoTypeInformation

Then upload machines.csv on the order page. Comma, semicolon or tab separated files all work, and column names like ComputerName or Hostname are recognised too. Sample file.

Deploying the keys

The CSV you get back has PcName,MachineId,LicenseKey. Put it on a read-only share and run Install-MczLicense.ps1 on each PC (GPO startup script, Intune or remoting). It picks the row that matches the PC's Machine ID and installs the key for all users.

# On each PC, elevated (e.g. computer startup script)
.\Install-MczLicense.ps1 -Csv \\fileserver\mcz$\mcz-licences.csv

# Or push from an admin workstation
Import-Csv .\mcz-licences.csv | ForEach-Object {
    Invoke-Command -ComputerName $_.PcName -FilePath .\Install-MczLicense.ps1 -ArgumentList $null, $_.LicenseKey
}

The Machine ID changes if Windows is reinstalled or the system drive is replaced. Contact support with the old and new IDs and we'll re-issue the key.