Select-AzureRmProfile
Loads Azure authentication information from a file.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.
Syntax
Select-AzureRmProfile
[-Profile] <AzureRMProfile>
[<CommonParameters>]
Select-AzureRmProfile
[-Path] <String>
[<CommonParameters>]
Description
The Select-AzureRmProfile cmdlet loads authentication information from a file to set the Azure environment and context. Cmdlets that you run in the current session use this information to authenticate requests to Azure Resource Manager.
Examples
Example 1: Selecting a profile from a PSAzureProfile
PS C:\> Select-AzureRmProfile -Profile (Add-AzureRmAccount)
Environment : AzureCloud
Account : test@outlook.com
TenantId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SubscriptionId : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SubscriptionName : Test Subscription
CurrentStorageAccount :
This example selects a profile from a PSAzureProfile that is passed through to the cmdlet.
Example 2: Selecting a profile from a JSON file
PS C:\> Select-AzureRmProfile -Path C:\test.json
Environment : AzureCloud
Account : test@outlook.com
TenantId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SubscriptionId : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
SubscriptionName : Test Subscription
CurrentStorageAccount :
This example selects a profile from a JSON file that is passed through to the cmdlet. This JSON file can be created from Save-AzureRmProfile.
Parameters
-Path
Specifies the path to profile information saved by using Save-AzureRMProfile.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Type: | AzureRMProfile |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
PSAzureProfile