Get-CmAzContext

Gets the session context.

Gets the current project directory and environment, which are used as context to a range of commands that might be executed as part of a deployment. The project directory contains naming standards and pipelines to deploy.

This command is part of the common command tooling.

Parameters

-RequireAzure

Required. (SwitchParameter) Throws an exception if no Azure Context is set, prompting the user to sign in with Login-AzAccount or similar.

-ThrowIfUnavailable

Required. (SwitchParameter) Throws an exception if the Cloudmarque Azure context is unset or empty, prompting the user to call the `Set-CmAzContext` command.

Examples

Example 1

1
2
3
    $ctx = Get-CmAzContext -RequireAzure -ThrowIfUnavailable