Forum Discussion
dmarquesgn
Apr 24, 2023Iron Contributor
Password management for Powershell scripts
Hi, I have some Powershell scripts to manage some security tasks, and I always send the results of the script over by email. The problem I'm facing now is that when I need to change my email passwo...
AndySvints
May 01, 2023Iron Contributor
Hello dmarquesgn,
Please look into Microsoft.PowerShell.SecretManagement module.
You can use it to store your secrets in Local store, as well as in othe vaults ( Azure Key is supported).
Use Register-SecretVault to register your Azure Key vault.
$params = @{
Name = 'Azure'
ModuleName = 'Az.KeyVault'
VaultParameters = @{
AZKVaultName = 'MyAzureKeyVault'
SubscriptionId = (Get-AzContext).Subscription.Id
}
DefaultVault = $true
}
Register-SecretVault @paramsHope that helps.