These pages cover SQL Clone 1, which is not the latest version. Help for other versions is also available.
Gets clone details from a SQL Clone Server.
Get-SqlClone [[-Name] <string>] [[-Location] <SqlServerInstanceResource>] [[-Image] <ImageResource>] [<CommonParameters>]
The Get-SqlClone cmdlet gets details of clones from a SQL Clone Server.
Without parameters, this cmdlet gets details of all clones. You can specify a particular clone by name, SQL Server instance and/or parent image.
This cmdlet returns a CloneResource which can be passed to the Remove-SqlClone cmdlet to delete a clone.
Connect-SqlClone must be called before this cmdlet.
-Name
<System.String>
Specifies the name of the clone. Wildcards are permitted.
| Aliases | None |
| Required? | false |
| Position? | 0 |
| Default Value | None |
| Accept Pipeline Input | false |
| Accept Wildcard Characters | false |
-Location
<RedGate.SqlClone.Client.Api.Objects.SqlServerInstanceResource>
Specifies the server instance that the clone is on. If no location is specified then details of clones on all server instances will be returned.
| Aliases | None |
| Required? | false |
| Position? | 1 |
| Default Value | None |
| Accept Pipeline Input | true (ByValue) |
| Accept Wildcard Characters | false |
-Image
<RedGate.SqlClone.Client.Api.Objects.ImageResource>
Specifies the image that the clone was created from. If no image is specified then details of clones for all parent images will be returned.
| Aliases | None |
| Required? | false |
| Position? | 2 |
| 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.
The input type is the type of the objects that you can pipe to the cmdlet.
Specifies the server instance that the clone is on. If no location is specified then details of clones on all server instances will be returned.
Specifies the image that the clone was created from. If no image is specified then details of clones for all parent images will be returned.
The output type is the type of the objects that the cmdlet emits.
Get-SqlClone
This command gets details of all clones from a SQL Clone Server.
$SqlServerInstance = Get-SqlCloneSqlServerInstance -MachineName TESTMACHINE -InstanceName SQL2014 Get-SqlClone -Name 'ClonedDatabase' -Location $SqlServerInstance
This example gets details of a specific clone named 'CloneDatabase' on 'TESTMACHINE/SQL2014'.
$ParentImage = Get-SqlCloneImage -Name 'Example-Image' Get-SqlClone -Image $ParentImage
This example gets details of all clones based on the image 'Example-Image'.