SQL Clone 5

Rename-SqlClone

Renames a clone.

Syntax

Rename-SqlClone [-Clone] <CloneResource> [-NewName] <string> [<CommonParameters>]

Description

The Rename-SqlClone cmdlet starts renaming a clone and outputs details of the rename operation.

The clone will be placed into single-user mode while being renamed.

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

Connect-SqlClone must be called before this cmdlet.

Parameters

-Clone <RedGate.SqlClone.Client.Api.Objects.CloneResource>

Specifies the clone to rename. The Get-SqlClone cmdlet can be used to get a CloneResource.

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

-NewName <System.String>

Specifies the new name of the clone.

Aliases None
Required? true
Position? 1
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.

  • RedGate.SqlClone.Client.Api.Objects.CloneResource

    Specifies the clone to rename. The Get-SqlClone cmdlet can be used to get a CloneResource.

  • System.String

    Specifies the new name of the clone.

Return values

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

  • RedGate.SqlClone.Client.Api.Objects.OperationResource

Examples

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

$CloneToRename = Get-SqlClone -Name 'CloneToRename' 
Rename-SqlClone -Clone $CloneToRename -NewName 'NewName' | Wait-SqlCloneOperation

This example renames a clone with the name 'CloneToRename' to 'NewName'.


Didn't find what you were looking for?