The Switch-AzureCliAuthMode / Switch-AzurePowerShellMode /
Switch-MgGraphPowerShellMode functions were ~identical (only the get/set
cmdlets and the product label differed).
This helper centralizes the toggle/
set/get-current logic; each public function passes its own GetState/SetState
script blocks and label.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.