PrepAway - Latest Free Exam Questions & Answers

Which PowerShell command should you use?

You administer an Azure subscription with an existing cloud service named contosocloudservice.
Contosocloudservice contains a set of related virtual machines (VMs) named ContosoDC, ContosoSQL and
ContosoWeb1.
You want to provision a new VM within contosocloudservice.
You need to use the latest gallery image to create a new Windows Server 2012 R2 VM that has a target
IOPS of 500 for any provisioned disks.
Which PowerShell command should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
This example creates a new Windows virtual machine configuration with operating system disk, data disk
and provisioning configuration. This configuration is then used to create a new virtual machine.
C:\\PS> $image = (Get-AzureVMImage).ImageName
C:\\PS>New-AzureVMConfig -Name “MyVM1” -InstanceSize ExtraSmall -ImageName $image ` | AddAzureProvisioningConfig -Windows -Password $adminPassword ` | Add-AzureDataDisk -CreateNew –
DiskSizeInGB 50 -DiskLabel ‘datadisk1’ -LUN 0 ` | New-AzureVM –ServiceName “MySvc1”

New-AzureVMConfig
URL: http://msdn.microsoft.com/en-us/library/dn495159.aspx

8 Comments on “Which PowerShell command should you use?

  1. Iain says:

    A

    From the Microsoft Press exam study book (pg74):
    https://books.google.co.uk/books?id=BF-5BgAAQBAJ&pg=PA75&lpg=PA75

    To add a new virtual machine in an existing cloud service with New-AzureVM, you can omit or specify the Location parameter (either option works).

    New-AzureQuickVM will fail if you specify the location and also if the cloud service name specified in ServiceName already exists. New-AzureVM will produce a warning that the cloud service already exists but will continue

    B is ruled out because it is not a valid VM size (it is a cloud service size)
    C and D are ruled out because they use the New-AzureQuickVM option where the service already exists.




    0



    0

Leave a Reply