You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I query for a list of virtual machines in DevTest Labs, I get the list back. When I also try to expand the properties (namely get the list of artifacts applied to the machines), I get an error, "Parameter set cannot be resolved using the specified named parameters.". Examples below.
# Setup variables$DebugPreference="Continue"$resourceId='/subscriptions/39df6a21-006d-4800-a958-2280925030cb/resourceGroups/EastUS_VMsRG213874/providers/Microsoft.DevTestLab/labs/EastUS_VMs/virtualmachines'# Command returns the list of VMs correctly (in the latest version of Azure Powershell)Get-AzureRmResource-ResourceId $resourceId# Command errors out with "Parameter set cannot be resolved using the specified named parameters."Get-AzureRmResource-ResourceId $resourceId-ODataQuery '$expand=Properties($expand=Artifacts)'
$PSVersionTable
Name Value
---------
PSVersion 5.1.17763.134
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.17763.134
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Resolve-AzureRmError
PS C:\WINDOWS\system32>Resolve-AzureRmError
DEBUG: 5:01:12 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 5:01:12 PM - using account id 'phauge@microsoft.com'...
HistoryId: 13
Message : Parameter set cannot be resolved using the specified named parameters.
StackTrace : at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)
at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
---End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext
funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.ParameterBindingException
InvocationInfo : {Get-AzureRmResource}
Line : Get-AzureRmResource-ResourceId $resourceId-ODataQuery '$expand=Properties($expand=Artifacts)'
Position : At line:4 char:1+Get-AzureRmResource-ResourceId $resourceId-ODataQuery '$expand=Prop ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~HistoryId : 13 HistoryId: 7Message : Parameter set cannot be resolved using the specified named parameters.StackTrace : at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters) at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Exception : System.Management.Automation.ParameterBindingExceptionInvocationInfo : {Get-AzureRmResource}Line : Get-AzureRmResource -ResourceId $resourceId -ODataQuery '$expand=Properties($expand=Artifacts)'Position : At line:1 char:1 + Get-AzureRmResource -ResourceId $resourceId -ODataQuery '$expand=Prop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 7
HistoryId: 5
Message : Parameter set cannot be resolved using the specified named parameters.
StackTrace : at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)
at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
---End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext
funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.ParameterBindingException
InvocationInfo : {Get-AzureRmResource}
Line : Get-AzureRmResource-ResourceId $resourceId-ODataQuery '$expand=Properties($expand=Artifacts)'
Position : At line:1 char:1+Get-AzureRmResource-ResourceId $resourceId-ODataQuery '$expand=Prop ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~HistoryId : 5 HistoryId: -1Message : Unable to find type [System.Net.Http.HttpClient].StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Exception : System.Management.Automation.RuntimeExceptionInvocationInfo : {}Line : [System.Net.Http.HttpClient]Position : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.5\PSModule.psm1:2984 char:9 + [System.Net.Http.HttpClient] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~HistoryId : -1DEBUG: AzureQoSEvent: CommandName - Resolve-AzureRmError; IsSuccess - True; Duration - 00:00:00.0904196; Exception - ;DEBUG: Finish sending metric.DEBUG: 5:01:13 PM - ResolveError end processing.DEBUG: 5:01:13 PM - ResolveError end processing.
Debug Output
PS C:\WINDOWS\system32> $DebugPreference = "Continue"
$resourceId = '/subscriptions/39df6a21-006d-4800-a958-2280925030cb/resourceGroups/EastUS_VMsRG213874/providers/Microsoft.DevTestLab/labs/EastUS_VMs/virtualmachines'
# Command errors out with "Parameter set cannot be resolved using the specified named parameters."
Get-AzureRmResource -ResourceId $resourceId -ODataQuery '$expand=Properties($expand=Artifacts)'
Get-AzureRmResource : Parameter set cannot be resolved using the specified named parameters.
At line:4 char:1
+ Get-AzureRmResource -ResourceId $resourceId -ODataQuery '$expand=Prop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-AzureRmResource], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet
The text was updated successfully, but these errors were encountered:
Description
When I query for a list of virtual machines in DevTest Labs, I get the list back. When I also try to expand the properties (namely get the list of artifacts applied to the machines), I get an error, "Parameter set cannot be resolved using the specified named parameters.". Examples below.
Script/Steps for Reproduction
Module Version
Environment Data
Resolve-AzureRmError
Debug Output
The text was updated successfully, but these errors were encountered: