Redigera

Dela via


New-AzStorageLocalUserSshPassword

Regenerate SSH password of a specified local user in a storage account.

Syntax

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

Description

The New-AzStorageLocalUserSshPassword cmdlet regenerates SSH password of a specified local user in a storage account.

Examples

Example 1: Regenerate SSH password of a specified local user

New-AzStorageLocalUserSshPassword -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -UserName testuser1

SshPassword                                                                             
-----------                                                                             
<hidden>

This command regenerates SSH password 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 Regenerate Password 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