Difference when running script vs DeployApplication

So to deploy Cisco AnyConnect, I’ve built in a switch option, to account for future changes as the networking team adds functionality to their infrastructure.

The problem I’m having is when I run "DeployApplication.exe -DeployModules “Base,NAM” everything works great. When I run the script, which has “Base,NAM” set as the default for $DeployModules everything works great.
When I run DeployApplication.exe, only the Base option runs. What am I missing?

<pre class=“brush: powershell; gutter: true; first-line: 1; highlight: []; html-script: false”>
[string[]]$DeployModules = “Base,NAM”

Switch -Regex ($DeployModules)
'Base|All' {
#install Base MSIs
; Continue
'NAM' {
#install NAM MSIs
; Continue