Use naming-and-identifier rules that match what AutoRest PowerShell generates, and make flag-style parameter typing consistent with the name.
Apply these rules when editing custom cmdlets: 1) AutoRest v4 model namespaces are flattened
Microsoft.Azure.PowerShell.Cmdlets.<Product>.Models.*.Microsoft.Azure.PowerShell.Cmdlets.<Product>.Models.Api<YYYYMMDD>.*.2) Preserve AutoRest acronym casing exactly
...HCINic... may become ...Hcinic...).Models/*.cs (or use search in generated/) rather than guessing.3) Flag naming implies SwitchParameter
-Enable*, use [System.Management.Automation.SwitchParameter] (not [System.Boolean]).-EnableX:$false disables, and omission leaves the setting untouched—consistent with existing Az cmdlet patterns.Example (corrected flag parameter type):
function Update-AzSomething {
param(
[Parameter()]
[System.Management.Automation.SwitchParameter]$EnableSystemAssignedIdentity
)
if ($PSBoundParameters.ContainsKey('EnableSystemAssignedIdentity')) {
$identityEnabled = [bool]$EnableSystemAssignedIdentity
# ... apply enable/disable
}
}