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 password, I need to go to each script individually and change it, what is not the best approach I'm sure.
What's the best practices to solve this issue and have a centralized password, and I only need to change it on 1 place?
Thanks
3 Replies
- AndySvintsIron 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.
- Andres-BohrenIron ContributorCould Azure KeyVault a Solution for you?
- dmarquesgnIron ContributorHi,
For me I think that would be a viable solution. Do you have any link where I can see how can I do that?
Thanks