Skip to content

Commit 0834c96

Browse files
committed
Removed hyper-v dependency
1 parent 8029937 commit 0834c96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/clone/Remove-PSDCClone.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@
224224
try {
225225

226226
if ($computer.IsLocalhost) {
227-
$null = Dismount-VHD -Path $item.CloneLocation -Credential $Credential
227+
$null = Dismount-DiskImage -ImagePath $item.CloneLocation
228228
}
229229
else {
230230
$command = [ScriptBlock]::Create("Test-Path -Path '$($item.CloneLocation)'")
231231
Write-PSFMessage -Message "Dismounting disk '$($item.CloneLocation)' from $($item.HostName)" -Level Verbose
232232
$result = Invoke-PSFCommand -ComputerName $item.HostName -ScriptBlock $command -Credential $Credential
233233
#if (-not $result) {
234-
$command = [scriptblock]::Create("Dismount-VHD -Path '$($item.CloneLocation)'")
234+
$command = [scriptblock]::Create("Dismount-DiskImage -ImagePath '$($item.CloneLocation)'")
235235
$null = Invoke-PSFCommand -ComputerName $item.HostName -ScriptBlock $command -Credential $Credential
236236
#}
237237
}

0 commit comments

Comments
 (0)