Edit

Share via


Move-AzureService

Migrates a cloud service to the Azure Resource Manager stack.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

AbortMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-Abort]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

CommitMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-Commit]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

PrepareNewMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-Prepare]
    [-CreateNewVirtualNetwork]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

PrepareExistingMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-VirtualNetworkResourceGroupName] <String>
    [-VirtualNetworkName] <String>
    [-SubnetName] <String>
    [-Prepare]
    [-UseExistingVirtualNetwork]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

ValidateNewMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-Validate]
    [-CreateNewVirtualNetwork]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

ValidateExistingMigrationParameterSet

Move-AzureService
    [-ServiceName] <String>
    [-DeploymentName] <String>
    [-VirtualNetworkResourceGroupName] <String>
    [-VirtualNetworkName] <String>
    [-SubnetName] <String>
    [-Validate]
    [-UseExistingVirtualNetwork]
    [-Profile <AzureSMProfile>]
    [-InformationAction <ActionPreference>]
    [-InformationVariable <String>]
    [<CommonParameters>]

Description

The Move-AzureService cmdlet migrates a cloud service and a deployment inside that service to a resource group in the Azure Resource Manager stack.

Examples

Example 1: Prepare service migration

PS C:\> Move-AzureService -Prepare -ServiceName "ContosoService" -DeploymentName "ContosoVM" -CreateNewVirtualNetwork

This command prepares the service named ContosoService for migration to the Azure Resource Manager stack. The migration includes the deployment named ContosoVM.

Example 2: Start service migration

PS C:\> Move-AzureService -Commit -ServiceName "ContosoService" -DeploymentName "ContosoVM"

This command starts migration of the service named ContosoService to the Azure Resource Manager stack. The migration includes the deployment named ContosoVM.

Example 3: Cancel service migration

PS C:\> Move-AzureService -Abort -ServiceName "ContosoService" -DeploymentName "ContosoVM"

This command cancels migration of the service named ContosoService to the Azure Resource Manager stack.

Example 4: Prepare service migration to an existing virtual network

PS C:\> Move-AzureService -Prepare -ServiceName "ContosoService" -DeploymentName "ContosoVM" -UseExistingVirtualNetwork -VirtualNetworkResourceGroupName "VnetRG" -VirtualNetworkName "ContosoVNET" -SubnetName "ContosoSubnet"

This command prepares the service named ContosoService for migration to the Azure Resource Manager stack. The migration includes the deployment named ContosoVM. The migration uses a virtual network that was previously created.

Example 5: Validate service migration

PS C:\> Move-AzureService -Validate -ServiceName "ContosoService" -DeploymentName "ContosoVM" -CreateNewVirtualNetwork

This command validates migration for the service named ContosoService to the Azure Resource Manager stack. The migration includes the deployment named ContosoVM.

Example 6: Validate service migration to an existing virtual network

PS C:\> Move-AzureService -Validate -ServiceName "contosoService" -DeploymentName "contosoVM" -UseExistingVirtualNetwork -VirtualNetworkResourceGroupName "vnetRG" -VirtualNetworkName "contosoVNET" -SubnetName "contosoSubnet"

This command validates migration for the service named ContosoService to the Azure Resource Manager stack. The migration includes the deployment named ContosoVM. The migration uses a virtual network that was previously created.

Parameters

-Abort

Indicates that this cmdlet cancels the service migration.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AbortMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Commit

Indicates that this cmdlet starts the service migration.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommitMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreateNewVirtualNetwork

Indicates that this cmdlet creates a virtual network in the Azure Resource Manager stack.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareNewMigrationParameterSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateNewMigrationParameterSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeploymentName

Specifies the name of the cloud service deployment that this cmdlet migrates.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend

Parameter properties

Type:ActionPreference
Default value:None
Supports wildcards:False
DontShow:False
Aliases:infa

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InformationVariable

Specifies an information variable.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:iv

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Prepare

Indicates that this cmdlet prepares the cloud service for migration.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareNewMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PrepareExistingMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Parameter properties

Type:AzureSMProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceName

Specifies the name of the cloud service that this cmdlet migrates.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SubnetName

Specifies the name of the Subnet inside the virtual network.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareExistingMigrationParameterSet
Position:6
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateExistingMigrationParameterSet
Position:6
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseExistingVirtualNetwork

Indicates that this cmdlet migrates the cloud service to an existing virtual network in the Azure Resource Manager stack.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareExistingMigrationParameterSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateExistingMigrationParameterSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Validate

Specifies that this cmdlet validates the cloud service for migration.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ValidateNewMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateExistingMigrationParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualNetworkName

Specifies the name of a virtual network.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareExistingMigrationParameterSet
Position:5
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateExistingMigrationParameterSet
Position:5
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualNetworkResourceGroupName

Specifies the name of the resource group of an existing virtual network.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PrepareExistingMigrationParameterSet
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ValidateExistingMigrationParameterSet
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.