If I run this powershell command from an Azure cloud shell it executes fine and gives me a list of all VMs in the specified resource group:
Get-AzureRmVM -ResourceGroupName "MyGroup" -Status
If I execute it in a runbook from an automation account I get an error;
Get-AzureRmVM : Cannot process command because of one or more missing mandatory parameters: Name. At TestAutomationAccount-Job-StartVM:20 char:20 + + CategoryInfo : InvalidArgument: (:) [Get-AzureRmVM], ParameterBindingException + FullyQualifiedErrorId : MissingMandatoryParameter,Microsoft.Azure.Commands.Compute.GetAzureVMCommand
I'm trying to get a list of VMs within a resource group, and can't figure out why the apparent difference of behavior.