Skip to content

Commit 513a5b7

Browse files
committed
Changed return object to be of type PSDCImage instead of custom object
1 parent 21d2212 commit 513a5b7

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

functions/New-PSDCImage.ps1

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,16 @@
457457
}
458458

459459
# Add the results to the custom object
460-
[PSCustomObject]@{
461-
Name = $imageName
462-
Location = $imageLocation
463-
Size = $sizeMB
464-
Database = $databaseName
465-
Timestamp = $databaseTS
466-
}
460+
[PSDCImage]$image = New-Object PSDCImage
461+
462+
$image.ImageID = $result.ImageID
463+
$image.ImageName = $imageName
464+
$image.ImageLocation = $imageLocation
465+
$image.SizeMB = $sizeMB
466+
$image.DatabaseName = $databaseName
467+
$image.DatabaseTimestamp = $databaseTS
468+
469+
return $image
467470

468471
} # for each database
469472

0 commit comments

Comments
 (0)