Get-AzSqlInstanceKeyVaultKey
Hämtar key vault-nycklar för en SQL-hanterad instans.
Syntax
Get-AzSqlInstanceKeyVaultKey
[[-KeyId] <String>]
[-ResourceGroupName] <String>
[-InstanceName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlInstanceKeyVaultKey
[[-KeyId] <String>]
[-Instance] <AzureSqlManagedInstanceModel>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlInstanceKeyVaultKey
[[-KeyId] <String>]
[-InstanceResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Cmdleten Get-AzSqlInstanceKeyVaultKey hämtar information om Key Vault-nycklarna på en SQL-hanterad instans. Du kan visa alla nycklar på en hanterad instans eller visa en specifik nyckel genom att ange KeyId.
Exempel
Exempel 1: Hämta alla Key Vault-nycklar
Get-AzSqlInstanceKeyVaultKey -ResourceGroupName 'ContosoResourceGroup' -InstanceName 'ContosoManagedInstanceName'
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Type : AzureKeyVault
Det här kommandot hämtar alla Key Vault-nycklar på en SQL-hanterad instans.
Exempel 2: Hämta en specifik Key Vault-nyckel
Get-AzSqlInstanceKeyVaultKey -ResourceGroupName 'ContosoResourceGroup' -InstanceName 'ContosoManagedInstanceName' -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Type : AzureKeyVault
Det här kommandot hämtar Key Vault-nyckeln med IDhttps://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901.
Exempel 3: Använda instansobjekt
$managedInstance = Get-AzSqlInstance -Name 'ContosoManagedInstanceName' -ResourceGroupName 'ContosoResourceGroup'
Get-AzSqlInstanceKeyVaultKey -Instance $managedInstance -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Type : AzureKeyVault
Det här kommandot hämtar Key Vault-nyckeln med IDhttps://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901.
Exempel 4: Använda instansresurs-ID
$managedInstance = Get-AzSqlInstance -Name 'ContosoManagedInstanceName' -ResourceGroupName 'ContosoResourceGroup'
Get-AzSqlInstanceKeyVaultKey -InstanceResourceId $managedInstance.ResourceId -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Type : AzureKeyVault
Det här kommandot hämtar Key Vault-nyckeln med IDhttps://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901.
Exempel 5: Använda rörledningar
$managedInstance = Get-AzSqlInstance -Name 'ContosoManagedInstanceName' -ResourceGroupName 'ContosoResourceGroup'
$managedInstance | Get-AzSqlInstanceKeyVaultKey -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Type : AzureKeyVault
Det här kommandot hämtar Key Vault-nyckeln med IDhttps://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901.
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 |
-Instance
Instansens indataobjekt
Typ: | AzureSqlManagedInstanceModel |
Alias: | InputObject |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-InstanceName
Instansnamnet
Typ: | String |
Position: | 1 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-InstanceResourceId
Instansresurs-ID
Typ: | String |
Alias: | ResourceId |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-KeyId
AzureKeyVault-nyckel-ID
Typ: | String |
Position: | 1 |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceGroupName
Resursgruppens namn
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten körs. 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
System.String
Utdata
Azure PowerShell