Skip to content

About Me

Sysadmin by day. Father, Husband, and aspiring DevOps Professional by Night

why you no build

PowerShell Secrets

PowerShell Secrets Installation

Microsoft's Installtion Guide

Creating a Vault and adding a secret

Register SecretVault

Read-Host -AsSecureString | Export-Clixml -Path C:\Temp\TTELAB.xml -Force

$secureVaultPasswordPath = 'C:\Temp\TTELAB.xml'

Register-SecretVault -Name TTELAB -ModuleName Microsoft.PowerShell.SecretStore -DefaultVault

$vaultUnlockPassword = Import-CliXml -Path $secureVaultPasswordPath

Unlock-SecretStore -Password $vaultUnlockPassword

$storeConfiguration = @{
    Authentication = 'Password'
    PasswordTimeout = 3600 # 1 hour
    Interaction = 'None'
    Confirm = $false
}
Set-SecretStoreConfiguration @storeConfiguration