I have assigned output of aws command to a variable:
$SECRET_KEY = (aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:us-east-1:12345:secret:non-prod/testing/private-key-8PPof --query 'SecretString' --output text)
Now i want to export the output of this to environment variable.
if i use below
$env:SECRET_KEY=$SECRET_KEY
>> output formatting is messed up and everything is coming in one line with spaces for the key instead of newline
Can anyone help with how to export the output of the aws command as environment variable to the powershell cli