Set-​Azure​Rm​Current​Storage​Account

Modifies the current Storage account of the specified subscription.

Syntax

Set-AzureRmCurrentStorageAccount
   -ResourceGroupName <String>
   -Name <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureRmCurrentStorageAccount
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   -Context <AzureStorageContext>
   [<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:AzureStorageContext
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

-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False