Starts deleting an image.


Remove-SqlCloneImage [-Image] <ImageResource> [<CommonParameters>]


The Remove-SqlCloneImage cmdlet starts deleting a SQL Clone image and outputs details of the deletion operation.

This cmdlet returns a OperationResource which can be passed to the Wait-SqlCloneOperation cmdlet.

Any clones of the image must be deleted before the image can be deleted.

Connect-SqlClone must be called before this cmdlet.


-Image <RedGate.SqlClone.Client.Api.Objects.ImageResource>

Specifies the image to delete. The Get-SqlCloneImage cmdlet can be used to get an ImageResource.

Aliases None
Required? true
Position? 0
Default Value None
Accept Pipeline Input true (ByValue)
Accept Wildcard Characters false


This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see


The input type is the type of the objects that you can pipe to the cmdlet.

Return values

The output type is the type of the objects that the cmdlet emits.


---------- EXAMPLE 1 ----------

$ImageToDelete = Get-SqlCloneImage -Name 'ImageToDelete' 
Remove-SqlClone -Image $ImageToDelete

This example deletes an image with the name 'ImageToDelete'.

---------- EXAMPLE 2 ----------

Get-SqlCloneImage -Name 'ImageToDelete' | Remove-SqlClone | Wait-SqlCloneOperation

This example uses the pipeline operator to delete the image 'ImageToDelete' and waits for the operation to complete before returning.