Table of Contents

Use-CafContext

Ensures that the current powershell context for Azure is aligned with Get-CafContext.

Syntax

Use-CafContext
    [-SubscriptionId <string>]

Description

This command will use Get-CafContext to get the target tenant and subscription id and compares this with the current powershell context. If they differ, the command will set the powershell context to the values specified in the .azcontext file. If the .azcontext file does not exist, the command will fail.

Example

Use-CafContext

Parameter

-SubscriptionId
The id of the subscription to use the context of.

Property Value
Type: string
Default value: None
Required: False