Modifier

Partager via


Get-AzSshKey

Gets the properties of SSH Public Key resources.

Syntax

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

Description

Gets the properties of SSH Public Key resources.

Examples

Example 1

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

This example retrieves a specific Ssh Public Key resource.

Example 2

Get-AzSshKey -ResourceGroupName "testRG"

This example retrieves a list of Ssh Public Key resources that are in Resource Group: "testRG"

Example 3

Get-AzSshKey

This example retrieves all the Ssh Public Key resources in the subscription.

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

-Name

Specifies the name of the Ssh Public Key resource to get.

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

-ResourceGroupName

Specifies the name of a resource group.

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

-ResourceId

Resource ID for your SSH Public Key Resource.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

String

Outputs

PSSshPublicKeyResource