diff --git a/api/hyperv-winrm/vhd.go b/api/hyperv-winrm/vhd.go index 75a2a6b..015e315 100644 --- a/api/hyperv-winrm/vhd.go +++ b/api/hyperv-winrm/vhd.go @@ -120,7 +120,7 @@ function Expand-Downloads { $vhdPath = Get-ChildItem $tempPath *"Virtual Hard Disks"* -Recurse -Directory - if ($vhdPath -and Test-Path $($vhdPath.FullName)) { + if ($vhdPath -and (Test-Path $($vhdPath.FullName))) { Move-Item "$($vhdPath.FullName)\*.*" $FolderPath } else { Move-Item "$tempPath\*.*" $FolderPath @@ -145,7 +145,7 @@ function Expand-Downloads { $vhdPath = Get-ChildItem $tempPath *"Virtual Hard Disks"* -Recurse -Directory - if ($vhdPath -and Test-Path $($vhdPath.FullName)) { + if ($vhdPath -and (Test-Path $($vhdPath.FullName))) { Move-Item "$($vhdPath.FullName)\*.*" $FolderPath } else { Move-Item "$tempPath\*.*" $FolderPath