Moving a VM from Existing Subnet to a New Subnet
You have been asked to move a VM named Server01 to SubnetB from SubnetA in your Azure cloud service named mycloud. Complete the PowerShell commands below:
C:\ PS> $vm = ______________ "mycloud" -Name "Server01"
C:\ PS> _______________ "SubnetB" -VM $vm
C:\ PS> _______________ "mycloud" -Name "Server01" -VM $vm
New-AzureVM | Get-AzureVMImage | Update-AzureVMImage | Set-AzureVNetConfig | Set-AzureSubnet | Get-AzureVM | Update-AzureVM
The first command you use should be Get-AzureVM so you can populate the variable with your current VM configuration. You should then use the Set-AzureSubnet command to update the virtual machine's configuration to use SubnetB. Lastly, the Update-AzureVM command should be used to update the actual VM with the updated configuration.
Click here for my PREMIUM practice questions.