你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzCurrentStorageAccount
Modifies the current Storage account of the specified subscription.
Syntax
Set-AzCurrentStorageAccount
-ResourceGroupName <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
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.
Type: | IStorageContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the resource group that contains the Storage account to modify.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |