Dela via


Update-AzSshKey

Uppdatera en offentlig SSH-nyckelresurs.

Syntax

Update-AzSshKey
      -ResourceGroupName <String>
      -Name <String>
      -PublicKey <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSshKey
      -ResourceId <String>
      -PublicKey <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSshKey
      -InputObject <PSSshPublicKeyResource>
      -PublicKey <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Uppdatera en offentlig SSH-nyckelresurs.

Exempel

Exempel 1

$SshKey1 = Get-AzSshKey -ResourceGroupName "testRG" -Name "sshKey1"
Update-AzSshKey -ResourceGroupName "testRG" -Name "sshKey2" -PublicKey $SshKey1.publickey

Uppdateringar det offentliga nyckelvärdet för "sshKey2" med offentligt nyckelvärde från "sshKey1"

Parametrar

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:IAzureContextContainer
Alias:AzContext, AzureRmContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

Offentligt nyckelobjekt för PowerShell SSH

Typ:PSSshPublicKeyResource
Alias:SshKey
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-Name

Anger namnet på den offentliga Ssh-nyckelresursen som ska hämtas.

Typ:String
Alias:sshkeyName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:True

-PublicKey

Värde för offentlig nyckel.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-ResourceGroupName

Anger namnet på en resursgrupp.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:True

-ResourceId

Resurs-ID för din offentliga SSH-nyckelresurs.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

String

Utdata

PSSshPublicKeyResource