update type conversion
This commit is contained in:
@@ -126,11 +126,11 @@ param(
|
|||||||
[string]$Arguments='null',
|
[string]$Arguments='null',
|
||||||
[Parameter(Mandatory=$false,ParameterSetName='live-ps')]
|
[Parameter(Mandatory=$false,ParameterSetName='live-ps')]
|
||||||
[Parameter(Mandatory=$false,ParameterSetName='local')]
|
[Parameter(Mandatory=$false,ParameterSetName='local')]
|
||||||
[System.Collections.ArrayList]$HaltIfRunning='null'
|
[System.Collections.ArrayList]$HaltIfRunning
|
||||||
)
|
)
|
||||||
$LogName = $MyInvocation.MyCommand
|
$LogName = $MyInvocation.MyCommand
|
||||||
If ( $Arguments -eq "null" ) { $Arguments = $null }
|
If ( $Arguments -eq "null" ) { $Arguments = $null }
|
||||||
If ( $HaltIfRunning -eq "null" ) { $HaltIfRunning = $null }
|
#If (! ($HaltIfRunning) ) { $HaltIfRunning = $null }
|
||||||
switch ($PSCmdlet.ParameterSetName)
|
switch ($PSCmdlet.ParameterSetName)
|
||||||
{
|
{
|
||||||
'live-ps'
|
'live-ps'
|
||||||
@@ -151,7 +151,7 @@ switch ($PSCmdlet.ParameterSetName)
|
|||||||
If ( Test-Path $Path )
|
If ( Test-Path $Path )
|
||||||
{
|
{
|
||||||
$Halt = $false
|
$Halt = $false
|
||||||
If ( $HaltIfRunning -ne $null )
|
If ( $HaltIfRunning )
|
||||||
{
|
{
|
||||||
Log "Checking for running instances of the following dependent apps:" -Name $LogName
|
Log "Checking for running instances of the following dependent apps:" -Name $LogName
|
||||||
ForEach ( $name in $HaltIfRunning)
|
ForEach ( $name in $HaltIfRunning)
|
||||||
|
|||||||
Reference in New Issue
Block a user