When you try to install Client Access Licenses (CAL) for Windows Server 2016 by using the New-Item cmdlet and specify 5 as the ProductVersion parameter, the following error occurs:
PS > New-Item -path RDS:\LicenseServer\LicenseKeyPacks -InstallOption INSTALL -ConnectionMethod AUTO -L
icenseType agreement -ProductVersion 5 -AgreementNumber AgreementNumber -AgreementType X -ProductType X -LicenseCount x
New-Item : Cannot bind parameter 'ProductVersion'. Cannot validate argument "5" because it does not belong to the set
"0, 1, 2, 3, 4".
At line:1 char:1
+ New-Item -path RDS:\LicenseServer\LicenseKeyPacks -InstallOption INST ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (RDS:\LicenseSer...LicenseKeyPack>:String) [New-Item], ParameterBindingExce
ption
+ FullyQualifiedErrorId : ArgumentError,Microsoft.PowerShell.Commands.NewItemCommand