Skip to content

Commit 09e37ab

Browse files
committed
Improved ShouldSupport
1 parent c645a2a commit 09e37ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

functions/Remove-PSDCImage.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
Write-PSFMessage -Message "Started removing database images" -Level Verbose
112112

113113
# Get all the items
114-
$items = Get-PSDCImage -PSDCSqlCredential $pdcCredential
114+
$items = Get-PSDCImage
115115

116116
if ($ImageID) {
117117
Write-PSFMessage -Message "Filtering image ids" -Level Verbose
@@ -216,7 +216,7 @@
216216
Stop-PSFFunction -Message "Couldn't retrieve clone records for host $($result.HostName)" -ErrorRecord $_ -Target $hst -Continue
217217
}
218218

219-
if ($PSCmdlet.ShouldProcess($item.ImageLocation, "Removing image '$($item.ImageLocation)' from system")) {
219+
if ($PSCmdlet.ShouldProcess($item.ImageLocation, "Removing image from system")) {
220220
# Remove the image from the file system
221221
try {
222222
if ($computer.IsLocalhost) {
@@ -247,7 +247,7 @@
247247
}
248248
}
249249

250-
if ($PSCmdlet.ShouldProcess($item.ImageLocation, "Removing image from system database")) {
250+
if ($PSCmdlet.ShouldProcess($item.ImageLocation, "Removing image from database")) {
251251
# Remove the image from the database
252252
try {
253253
$query = "DELETE FROM dbo.Image WHERE ImageID = $($item.ImageID)"

0 commit comments

Comments
 (0)