編輯

共用方式為


Get-AzStorageLocalUserKey

Lists SSH authorized keys and shared key of a specified local user.

Syntax

Get-AzStorageLocalUserKey
   [-ResourceGroupName] <String>
   [-StorageAccountName] <String>
   -UserName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzStorageLocalUserKey
   -StorageAccount <PSStorageAccount>
   -UserName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzStorageLocalUserKey
   [-InputObject] <PSLocalUser>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Get-AzStorageLocalUserKey cmdlet lists SSH authorized keys and shared key of a specified local user in a storage account.

Examples

Example 1: List SSH authorized keys and shared key of a specified local user.

Get-AzStorageLocalUserKey -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -UserName testuser1

SshAuthorizedKeys                                    SharedKey                                                                               
-----------------                                    ---------                                                                               
{ssh-rsa keykeykeykeykew=, ssh-rsa keykeykeykeykew=} <hidden>

This command lists SSH authorized keys and shared key of a specified local user.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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

-InputObject

Local User Object to get Keys.

Type:PSLocalUser
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Resource Group Name.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccount

Storage account object

Type:PSStorageAccount
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-StorageAccountName

Storage Account Name.

Type:String
Aliases:AccountName
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UserName

The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.

Type:String
Aliases:Name
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSStorageAccount

Outputs

PSLocalUserKeys