I'm new to powershell. I refered to http://msdn.microsoft.com/en-us/library/windowsazure/jj152815.aspx example 3. here is my cmd:
$myVM = New-AzureVMConfig -Name "MyVM2" -InstanceSize Extrasmall -ImageName (Get-AzureVMImage)[4].ImageName| Add-AzureProvisioningConfig -VM PersistentVMRole -Windows -Password "Password1!"
| Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel "DataDisk50" -LUN 0
But I get the error here:
New-AzureVMConfig : A positional parameter cannot be found that accepts argument 'Add-AzureProvisioningConfig'.
At line:1 char:26
+ $myVM = New-AzureVMConfig <<<< -Name "MyVM2" -InstanceSize Extrasmall -ImageName (Get-AzureVMImage)[4].ImageName| A
dd-AzureProvisioningConfig -Windows -Password "Password1!"
| Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel "
DataDisk50" -LUN 0
+ CategoryInfo : InvalidArgument: (:) [New-AzureVMConfig], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.New
AzureVMConfigCommand
Please can anyone explain why does this example can't be run? I'm going to crazy!