I have an app that installs 2 different SKUs of the product based on the serial number entered. I have 4 transforms, one for each SKU that enters the correct serial number and they are working fine when manually installed.
I need to add a custom command line parameter so I can specify the SKU for the install so the correct product is installed.
Here is what I have done so far:
Added to the Param section of Deploy-Application.ps1
[Parameter(Mandatory=$false)]
[ValidateSet('Standard','Professional')]
[string]$ApplicationSKU = 'Standard'
Added to the Pre-Installation Tasks section to see if the variable is being set in the log:
Write-Log -Message ‘ApplicationSKU is $ApplicationSKU’
When I run Deploy-Application.exe -ApplicationSKU Standard, I get the following in the log file:
[Initialization] :: The following non-default parameters were passed to [Deploy Application]: [-ApplicationSKU “Standard”]
and further down I see:
[Pre-Installation] :: ApplicationSKU is $ApplicationSKU
It appears that I am missing some step to get the value passed from -ApplicationSKU assigned to $ApplicationSKU.
Any help would be appreciated.