update type conversion

This commit is contained in:
2020-09-23 15:40:05 -04:00
parent 46cd6ccab5
commit 4e43b98a4f
+3 -3
View File
@@ -126,11 +126,11 @@ param(
[string]$Arguments='null',
[Parameter(Mandatory=$false,ParameterSetName='live-ps')]
[Parameter(Mandatory=$false,ParameterSetName='local')]
[System.Collections.ArrayList]$HaltIfRunning='null'
[System.Collections.ArrayList]$HaltIfRunning
)
$LogName = $MyInvocation.MyCommand
If ( $Arguments -eq "null" ) { $Arguments = $null }
If ( $HaltIfRunning -eq "null" ) { $HaltIfRunning = $null }
#If (! ($HaltIfRunning) ) { $HaltIfRunning = $null }
switch ($PSCmdlet.ParameterSetName)
{
'live-ps'
@@ -151,7 +151,7 @@ switch ($PSCmdlet.ParameterSetName)
If ( Test-Path $Path )
{
$Halt = $false
If ( $HaltIfRunning -ne $null )
If ( $HaltIfRunning )
{
Log "Checking for running instances of the following dependent apps:" -Name $LogName
ForEach ( $name in $HaltIfRunning)