Skip to main content

SYNOPSIS

Shared implementation for the Switch-*Mode auth-mode togglers.

SYNTAX

DESCRIPTION

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.

EXAMPLES

PARAMETERS

-Label

Product label used in the confirmation message (e.g. ‘Azure CLI’).

-GetState

Script block returning the current WAM-enabled state as a boolean.

-SetState

Script block that takes a single boolean (the desired WAM-enabled state).

-Mode

‘Browser’ or ‘WAM’. When omitted, the current state is toggled.

-GetCurrent

Display the current mode without changing it.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES