Set-AzCurrentStorageAccount
Modifies the current Storage account of the specified subscription.
Syntax
UsingResourceGroupAndNameParameterSet (Default)
Set-AzCurrentStorageAccount
-ResourceGroupName <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
UsingStorageContext
Set-AzCurrentStorageAccount
-Context <IStorageContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzCurrentStorageAccount cmdlet modifies the current Azure Storage account of the specified Azure subscription in Azure PowerShell. The current Storage account is used as the default when you access Storage without specifying a Storage account name.
Examples
Example 1: Set the current Storage account
Set-AzCurrentStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount"
This command sets the default Storage account for the specified subscription.
Parameters
-Context
Specifies an AzureStorageContext object for the current Storage account. To obtain a storage context object, use the New-AzStorageContext cmdlet.
Parameter properties
Type: | IStorageContext |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UsingStorageContext
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of the Storage account that this cmdlet modifies.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | StorageAccountName, AccountName |
Parameter sets
UsingResourceGroupAndNameParameterSet
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ResourceGroupName
Specifies the resource group that contains the Storage account to modify.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UsingResourceGroupAndNameParameterSet
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.