diff --git a/scripts/Common/Scripts/Software.ps1 b/scripts/Common/Scripts/Software.ps1 index 3ad566d4..81346ee5 100644 --- a/scripts/Common/Scripts/Software.ps1 +++ b/scripts/Common/Scripts/Software.ps1 @@ -205,7 +205,7 @@ $null = New-Module { ) [InstallerAction] $Action = & { - if ($Action.HasValue) { + if ($null -ne $Action) { $Action; } else { [InstallerAction]::Install; diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 80ff76c6..ea542f70 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -178,13 +178,13 @@ $null = New-Module { #> function Deploy-SoftwareAction { param( - [InstallerAction] $Action + [InstallerAction] $Action = $null ) [bool] $install = $null; $arguments = [hashtable]@{ }; - if ($Action) { + if ($null -ne $Action) { $install = ($Action -eq ([InstallerAction]::Install)); $null = $arguments.Add("action", $Action); } else {