Forum Discussion

Rambo363636's avatar
Rambo363636
Brass Contributor
Aug 20, 2024
Solved

Powershell error with the below code

Hi Champions, Can someone please help me with the below powershell code which i want to upload the key vault secrets excel csv file to azure key vault. But it is giving below error. $keyVault...
  • LainRobertson's avatar
    LainRobertson
    Aug 26, 2024

    Rambo363636 

     

    Replace the following existing line:

    $secretName = $row.$secretName

     

    With:

    $secretName = ConvertTo-SecureString -AsPlainText -String $row.$secretName -Force;

     

    The error's telling you that Set-AzKeyValutSecret wants a secure string, not a plain text string.

     

    Cheers,

    Lain

Resources