Skip to content

enable pipe between Get-AzVM and Get-AzVMExtension #11557

@skmkzyk

Description

@skmkzyk

Description of the new feature

Currently, Get-AzVM returns VM name with column name 'Name'.
But Get-AzVMExtension requires 'VMName' to specify VM name.
So, below cmdlet pipe is not working for now.

> get-azvm -name ephe01 -ResourceGroupName ephemeral-disks | Get-AzVMExtension
Get-AzVMExtension : The input object cannot be bound because it did not contain the information required to bind all mandatory parameters:  VMName
At line:1 char:60
+ ... m -name ephe01 -ResourceGroupName ephemeral-disks | Get-AzVMExtension
+                                                         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Azure...SVirtualMachine:PSObject) [Get-AzVMExtension], Param
   eterBindingException
    + FullyQualifiedErrorId : InputObjectMissingMandatory,Microsoft.Azure.Commands.Compute.GetAzureVMExtensionCommand

Is it happy to enable this type of cmdlet chaining?
This kind of disconnection will be occur other VM extension cmdlets.

Proposed implementation details (optional)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions