Skip to content

Commit 864d397

Browse files
committed
Removed the removal of the PS-Drive
1 parent c1f5176 commit 864d397

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

functions/image/Remove-PSDCImage.ps1

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,8 @@
272272

273273
$imageData = $imageData | Where-Object {$_.ImageID -ne $item.ImageID}
274274

275-
# Get the json file
276-
$jsonFolder = Get-PSFConfigValue -FullName psdatabaseclone.informationstore.path
277-
278-
# Create a PS Drive
279-
$null = New-PSDrive -Name JSONFolder -Root $jsonFolder -Credential $Credential -PSProvider FileSystem
280-
281275
# Set the image file
282-
$jsonImageFile = JSONFolder:\images.json
276+
$jsonImageFile = "JSONFolder:\images.json"
283277

284278
# Convert the data back to JSON
285279
if ($newImageData.Count -ge 1) {
@@ -289,9 +283,6 @@
289283
Clear-Content -Path $jsonImageFile
290284
}
291285

292-
# Remove the PS Drive
293-
$null = Remove-PSDrive -Name JSONFolder
294-
295286
}
296287
}
297288

0 commit comments

Comments
 (0)