Skip to content

Unregister-PSSMSecretVault

SecretManagement: Unregisters a secret vault

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

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

Process {
    try {
        Unregister-SecretVault -Name $VaultName -Confirm:$false -ErrorAction Stop
        [PSCustomObject]@{ Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"; Status = "Success"; VaultName = $VaultName; Message = "Vault '$VaultName' unregistered" }
    }
    catch { throw }
}

Name of the vault to unregister

An interactive directory of PowerShell scripts.