You are on page 1of 1

Login-AzureRmAccount

Get-AzureRMSubscription | Sort SubscriptionName | Select SubscriptionName


Select-AzureRmSubscription SubscriptionName "name"
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastruct
ureMigrate
Add-AzureAccount
Get-AzureSubscription | Sort SubscriptionName | Select SubscriptionName
Select-AzureSubscription SubscriptionName "name"
Get-AzureRmVMUsage -Location "East US"
Migrate virtual machines in a cloud service (not in a virtual network)
Get-AzureService | ft Servicename
$serviceName = "name"
$deployment = Get-AzureDeployment -ServiceName $serviceName
$deploymentName = $deployment.DeploymentName
Migrate the VMs to a platform-created virtual network
$validate = Move-AzureService -Validate -ServiceName $serviceName `
-DeploymentName $deploymentName -CreateNewVirtualNetwork
$validate.ValidationMessages
$existingVnetRGName = "name"
$vnetName = "name"
$subnetName = "name"
$validate = Move-AzureService -Validate -ServiceName $serviceName `
-DeploymentName $deploymentName -UseExistingVirtualNetwork -VirtualNetwork
ResourceGroupName $existingVnetRGName -VirtualNetworkName $vnetName -SubnetName
$subnetName
$validate.ValidationMessages
Move-AzureService -Prepare -ServiceName $serviceName -DeploymentName $deploy
mentName `
-UseExistingVirtualNetwork -VirtualNetworkResourceGroupName $existingVnetR
GName `
-VirtualNetworkName $vnetName -SubnetName $subnetName

You might also like