Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

Remove-AzManagementGroupDeploymentStack does not work correctly with Get-AzManagementGroupDeploymentStack #111

Closed slavizh closed 10 months ago

slavizh commented 1 year ago

You should not get error when you do it like this:

PS D:\dev\deployment-stacks\lz-policy-management> Get-AzManagementGroupDeploymentStack -ManagementGroupId Sponsor | Remove-AzManagementGroupDeploymentStack
Remove-AzManagementGroupDeploymentStack: The input object cannot be bound because it did not contain the information required to bind all mandatory parameters:  ManagementGroupId

as the first command contains the management group the passed object should just be removed as you have at which MG the stack is.

dantedallag commented 11 months ago

Hey @slavizh, this should be included in the PowerShell release next month.

dantedallag commented 10 months ago

New release is out and this should be fixed. Let us know if you are still seeing this.