SQL Clone 3

Rename-SqlCloneMachine

Rename-SqlCloneMachine

Renames a Machine.

Syntax

Rename-SqlCloneMachine [-Machine] <AgentResource> [-NewName] <string> [<CommonParameters>]

Description

The Rename-SqlCloneMachine cmdlet gives the machine an alias within SQL Clone.

You might want to use this to give a machine a more meaningful name.

Connect-SqlClone must be called before this cmdlet.

Parameters

-Machine <RedGate.SqlClone.Client.Api.Objects.AgentResource>

Specifies the machine to rename. The Get-SqlCloneMachine cmdlet can be used to get an AgentResource.

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 to be set for the machine.

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

    Specifies the machine to rename. The Get-SqlCloneMachine cmdlet can be used to get an AgentResource.

  • System.String

    Specifies the new name to be set for the machine.

Return values

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

  • None.
    You cannot pipe input to this cmdlet.

Examples

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

$MachineToRename = Get-SqlCloneMachine -Name 'WM20175123' 
Rename-SqlCloneMachine -Machine $MachineToRename -NewName 'Production'

This example renames a Machine with the name 'WM20175123' to 'Production'.


Didn't find what you were looking for?