Private/_NewNestedCred.ps1

1
2
3
4
5
6
7
8
9
10
11
function _NewNestedCred {
    [cmdletbinding()]
    param(
        [string]$VaultName = $Script:KeyVault.VaultName,
        [string]$SecretName,
        $SecretValue
    )
    $SecretName = "$($SecretName)-$($Secret.UserName)"
    $null = Set-AzKeyVaultSecret -VaultName $VaultName -SecretName $SecretName -SecretValue $SecretValue -Auto
    return $SecretName
}