Skip to content

Commit 11b3634

Browse files
authored
Merge pull request #4 from sanderstad/development
Important changes to Remove-Commands
2 parents d489c90 + 07c8de2 commit 11b3634

File tree

5 files changed

+2417
-14
lines changed

5 files changed

+2417
-14
lines changed

PSDatabaseClone.psd1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
'Get-PSDCImage',
7575
'Convert-PSDCLocalUncPathToLocalPath',
7676
'New-PSDCVhdDisk',
77-
'Initialize-PSDCVhdDisk'
77+
'Initialize-PSDCVhdDisk',
78+
'Test-PSDCRemoting'
7879

7980
# Cmdlets to export from this module
8081
CmdletsToExport = ''

functions/clone/Remove-PSDCClone.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,6 @@
297297
Clear-Content -Path $jsonCloneFile
298298
}
299299

300-
# Remove the PS Drive
301-
$null = Remove-PSDrive -Name JSONFolder
302-
303300
}
304301
}
305302

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)