共用方式為


Get-AzSshKey

取得 SSH 公鑰資源的屬性。

語法

Get-AzSshKey
   [-ResourceGroupName <String>]
   [-Name <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzSshKey
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

取得 SSH 公鑰資源的屬性。

範例

範例 1

Get-AzSshKey -ResourceGroupName "testRG" -Name "SshKey1"

此範例會擷取特定的 Ssh 公鑰資源。

範例 2

Get-AzSshKey -ResourceGroupName "testRG"

此範例會擷取資源群組中的 Ssh 公鑰資源清單:“testRG”

範例 3

Get-AzSshKey

此範例會擷取訂用帳戶中的所有 Ssh 公鑰資源。

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

指定要取得的 Ssh 公鑰資源名稱。

類型:String
別名:sshkeyName
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:True

-ResourceGroupName

指定資源群組的名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:True

-ResourceId

SSH 公鑰資源的資源識別碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

輸出

PSSshPublicKeyResource