In the current version, in order to stop an azure V2 vm (in resource manager mode), the "ResourceGroup" parameter is required. These cmdlets should support the "id" parameter in order to not have to grab the resourcegroup from the objects returned from get-azurevm.
Currently, in order to stop all V2 vms:
$vms = Get-azurevm
foreach ($vm in $vms)
{
$res = Get-AzureResource -ResourceId $vm.Id
Stop-AzureVM -ResourceGroupName $res.ResourceGroupName -Name $vm.Name -Force
}
Should be:
Get-azureVM | stop-azurevm
or
$vm = get-azurevm
Stop-AzureVM -id $vm.id