Skip to content
Eli Zeitlin edited this page Oct 22, 2016 · 1 revision

Welcome to the Azure Key Vault Explorer wiki!

PowerShell

Click on the PowerShell button, to open PowerShell session and auto run Vault.ps1 script. Vault.ps1 script loads VaultModule.psm1 and with currently selected vaults in the UI. VaultModule.psm1 exports the following functions:

Get-AzureVaultObject

NAME
    Get-AzureVaultObject

SYNOPSIS
    Obtain Microsoft.Vault.Library.Vault object reference from specified
    Vaults.json configuration file with single or dual name of the vault(s)
    This function will also update $Global:CurrentAzureVault variable


SYNTAX
    Get-AzureVaultObject [-vaultsConfigFile] <String> [-firstVaultName] <String> [[-secondVaultName] <String>]
    [<CommonParameters>]

Get-AzureVaultSecrets

NAME
    Get-AzureVaultSecrets

SYNOPSIS
    List all Azure vault secrets


SYNTAX
    Get-AzureVaultSecrets [[-vaultObject] <Vault>] [<CommonParameters>]

Get-AzureVaultSecretValue

NAME
    Get-AzureVaultSecretValue

SYNOPSIS
    Get Azure vault secret value


SYNTAX
    Get-AzureVaultSecretValue [-secretName] <String> [[-secretVersion] <String>] [[-vaultObject] <Vault>]
    [<CommonParameters>]

Set-AzureVaultSecret

NAME
    Set-AzureVaultSecret

SYNOPSIS
    Set Azure vault secret with value, tags, content type and other attributes


SYNTAX
    Set-AzureVaultSecret [-secretName] <String> [-secretValue] <String> [[-tags] <Hashtable>] [[-contentType]
    <String>] [[-secretAttributes] <SecretAttributes>] [[-vaultObject] <Vault>] [<CommonParameters>]

Update-AzureVaultSecret

NAME
    Update-AzureVaultSecret

SYNOPSIS
    Updates the attributes associated with the specified secret in Azure key vault


SYNTAX
    Update-AzureVaultSecret [-secretName] <String> [[-tags] <Hashtable>] [[-contentType] <String>]
    [[-secretAttributes] <SecretAttributes>] [[-secretVersion] <String>] [[-vaultObject] <Vault>] [<CommonParameters>]

Examples

List all enabled secrets which contain a particular value:

Get-AzureVaultSecrets | ? { ($_.Attributes.Enabled -eq $true) } | % { Get-AzureVaultSecretValue $_.Name } | ? { ($_.Value -ne $null) -and ($_.Value.Contains("foo")) }