Invoke-RestMethod
to read a GitHub Gist as my stringGet-AzKeyVaultSecret
returned the Key Vault Secret Object-AddPlainText
parameter which returned the PowerShell script. Finally I tested passing this to Invoke-Expression
to get the PowerShell script I saved executed