Set-AzureRmCurrentStorageAccount

Modifies the current Storage account of the specified subscription.

Syntax

Set-AzureRmCurrentStorageAccount
   -ResourceGroupName <String>
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmCurrentStorageAccount
   -Context <IStorageContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzureRmCurrentStorageAccount 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

PS C:\>Set-AzureRmCurrentStorageAccount -ResourceGroupName "RG01" -AccountName "MyStorageAccount"

This command sets the default storage account for the specified subscription.

Required Parameters

-Context

Specifies an AzureStorageContext object for the current Storage account. To obtain a storage context object, use the New-AzureStorageContext cmdlet.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the Storage account that this cmdlet modifies.

Type:String
Aliases:StorageAccountName, AccountName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the resource group that contains the Storage account to modify.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False