Given PowerShell's guideline on requesting confirmation for destructive cmdlets, AutoREST.PowerShell should set confirmImpact to high when generating Remove-* cmdlets.
Currently, Remove-* cmdlets are generated with a confirmImpact of medium. Since both ConfirmImpact and $ConfirmPreference are set by default to Medium, this means that, by default, no confirmation prompt is shown, and the cmdlet executes normally despite the destructive nature of Remove-* cmdlets.
Given PowerShell's guideline on requesting confirmation for destructive cmdlets, AutoREST.PowerShell should set
confirmImpact
tohigh
when generatingRemove-*
cmdlets.Currently,
Remove-*
cmdlets are generated with aconfirmImpact
ofmedium
. Since bothConfirmImpact
and$ConfirmPreference
are set by default toMedium
, this means that, by default, no confirmation prompt is shown, and the cmdlet executes normally despite the destructive nature ofRemove-*
cmdlets.Reference: https://github.com/Azure/autorest.powershell/blob/c5696cc48b1f1f68ae517f149fa060b5623e9046/powershell/generators/script-cmdlet.ts#L93