Skip to content

Test-PSSMSecretVault

SecretManagement: Tests a secret vault

#Requires -Version 5.1
#Requires -Modules Microsoft.PowerShell.SecretManagement

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$VaultName
)

Process {
    try {
        $result = Test-SecretVault -Name $VaultName -ErrorAction Stop
        [PSCustomObject]@{ Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"; VaultName = $VaultName; IsAvailable = $result }
    }
    catch { throw }
}

Name of the vault to test

An interactive directory of PowerShell scripts.