Closed justcallmetrell closed 4 years ago
@justcallmetrell Are you sure you didn't cut and paste and add "smart quotes" to your script (e.g. HTML quotes instead of regular quotes)? the error shows weird symbols around your quote marks which is what makes me wonder.
I had no issues running your code on a test vault.
@JustinGrote Great eyes & catch man! I re-typed and the command and deleted the line and that cleared the error; script runs as expected now! Thanks for the help...can't believe I looked over something so simple.
@justcallmetrell wisdom comes from experience, I've had that bite me before a lot in the past :)
Description
I have created a simple powershell script to create add secrets to an existing Azure Key Vault. The issue occurs when the command to create the secret (
Set-AzKeyVaultSecret
) is executed; the command errors with aSet-AzKeyVaultSecret : Invalid URI: The hostname could not be parsed.
The weird thing is, I can copy and paste the entire script in the Powershell CMD Line and it will run fine, with successful secret creation.
I have tried numerous fix attempts, such as formatting the variable as string directly but still same result. Any help would be appreciated.
Steps to reproduce
Environment data
Module versions
Debug output
Error output