Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

Get-AzStorageAccountKey

    Gets the access keys for an Azure Storage account.

    Syntax

    Default (Default)

    Get-AzStorageAccountKey    [-ResourceGroupName] <String>    [-Name] <String>    [-ListKerbKey]    [-DefaultProfile <IAzureContextContainer>]    [<CommonParameters>]

    Description

    TheGet-AzStorageAccountKey cmdlet gets the access keys for an Azure Storage account.

    Examples

    Example 1: Get the access keys for a Storage account

    Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount"

    This command gets the keys for the specified Azure Storage account.

    Example 2: Get a specific access key for a Storage account

    This command gets a specific key for a Storage account.(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount")| Where-Object {$_.KeyName -eq "key1"}KeyName Value             Permissions CreationTime------- -----             ----------- ------------key1    <KeyValue>        FullThis command gets a specific key value for a Storage account.(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount")[0].Value<KeyValue>

    Example 3: Lists the access keys for a Storage account, include the Kerberos keys (if active directory enabled)

    Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount" -ListKerbKey

    This command gets the keys for the specified Azure Storage account.

    Parameters

    -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

    -ListKerbKey

    Lists the Kerberos keys (if active directory enabled) for the specified storage account.Kerberos key is generated per storage account for Azure Files identity based authentication either with Microsoft Entra Domain Service (Microsoft Entra Domain Services) or Active Directory Domain Service (AD DS).It is used as the password of the identity registered in the domain service that represents the storage account.Kerberos key does not provide access permission to perform any control or data plane read or write operations against the storage account.

    Parameter properties

    Type:SwitchParameter
    Default value:None
    Supports wildcards:False
    DontShow:False

    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 for which this cmdlet gets keys.

    Parameter properties

    Type:String
    Default value:None
    Supports wildcards:False
    DontShow:False
    Aliases:StorageAccountName, AccountName

    Parameter sets

    (All)
    Position:1
    Mandatory:True
    Value from pipeline:False
    Value from pipeline by property name:True
    Value from remaining arguments:False

    -ResourceGroupName

    Specifies the name of the resource group that contains the Storage account.

    Parameter properties

    Type:String
    Default value:None
    Supports wildcards:False
    DontShow:False

    Parameter sets

    (All)
    Position:0
    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, seeabout_CommonParameters.

    Inputs

    String

    Outputs

    StorageAccountKey

    Related Links

    Collaborate with us on GitHub
    The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

    Feedback

    Was this page helpful?

    YesNoNo

    Need help with this topic?

    Want to try using Ask Learn to clarify or guide you through this topic?

    Suggest a fix?

    In this article

    Was this page helpful?

    YesNo
    NoNeed help with this topic?

    Want to try using Ask Learn to clarify or guide you through this topic?

    Suggest a fix?