Delen via


Get-AzBatchAccountKey

Hiermee haalt u de sleutels van een Batch-account op.

Syntax

Get-AzBatchAccountKey
   [-AccountName] <String>
   [-ResourceGroupName <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

De cmdlet Get-AzBatchAccountKey haalt de sleutels op van een Azure Batch-account in het huidige abonnement.

Voorbeelden

Voorbeeld 1: Batchaccountsleutels ophalen en opslaan in $Context variabele voor later gebruik

$Context = Get-AzBatchAccountKey -AccountName myaccount

Met deze opdracht worden de accountgegevens opgehaald en opgeslagen in een $Context object voor later gebruik.

Voorbeeld 2: Batch-accountsleutels ophalen en weergeven

$Context = Get-AzBatchAccountKey -AccountName myaccount
$Context.PrimaryAccountKey
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMN==
$Context.SecondaryAccountKey
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMN==

Met deze opdracht worden de accountsleutels ophaalt en afgedrukt naar de console.

Parameters

-AccountName

Hiermee geeft u de naam op van het account waarvoor deze cmdlet sleutels ophaalt.

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

-DefaultProfile

De referenties, het account, de tenant en het abonnement die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Hiermee geeft u de naam op van de resourcegroep die het account bevat waarvoor deze cmdlet sleutels ophaalt.

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

Invoerwaarden

String

Uitvoerwaarden

BatchAccountContext