Remove-SqlCloneImage

Starts deleting an image.

Syntax

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

Description

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.

Parameters

-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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

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.

Examples

---------- 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.