Forum Discussion
Powershell error with the below code
- Aug 26, 2024
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
oliwer_sundgren LainRobertson
Hi Oliwer & Lain,
I ran below and got the below output.
Looking forward to hear from you.
Regards,
Rambo
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
- LainRobertsonAug 27, 2024Silver Contributor
The error is telling you that the values for Secretvalue in the XLSX may only contain:
- Numbers (0-9);
- Lowercase letters (a-z);
- Uppercase letters (A-Z);
- The minus/hyphen/dash symbol (-).
Cheers,
Lain
- Rambo363636Aug 27, 2024Brass Contributor
LainRobertson oliwer_sundgren
Hi Lain & OliwerI have edited and ran the below code and now i get the below error.
Please advise the workaround.
Looking forward to hear from you.
Regards,
Rambo - Rambo363636Aug 27, 2024Brass Contributor
LainRobertson oliwer_sundgren
Hi Lain,
I ran the below as advised and received the below output.
Looking forward to hear from you. Thanks.
Regards,
Rambo