diff --git a/scripts/Common/Scripts/Software.ps1 b/scripts/Common/Scripts/Software.ps1 index c04960d5..3d0f9c22 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 4bb69dcd..0a02915c 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -175,13 +175,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 {