Create Custom Command Line Parameters

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.

It looks like the switches also need to be defined in the AppDeployToolkitMain.ps1 script. Here is what the $DeployMode entry looks like:

Switch ($deployMode) {
‘Silent’ { $deployModeSilent = $true }
‘NonInteractive’ { $deployModeNonInteractive = $true; $deployModeSilent = $true }
Default { $deployModeNonInteractive = $false; $deployModeSilent = $false }
}

Thanks Jim. I finally got around to testing this out and it worked.
In addition to the changes I noted in my first post, I added the following to the end of AppDeployToolkitMain.ps1:

Set appSKU switches

Switch ($ApplicationSKU) {
‘Professional’ { $appSKU = “professional” }
‘Standard’ { $appSKU = “standard” }
Default { $appSKU = “standard” }
}

I can then pass -ApplicationSKU as a command line parameter and reference its value as $appSKU in the script.