I ran into an issue concatenating a string within the following PowerShell command.
$ curl.exe -v 'https://developer.api.autodesk.com/authentication/v2/token' `
-X 'POST' `
-H 'Content-Type: application/x-www-form-urlencoded' `
-H 'Accept: application/json' `
-H "Authorization: Basic $creds" `
-d 'grant_type=client_credentials' `
-d 'scope=data:read'
What worked in the built-in PowerShell 5.x and PowerShell 7.x:
"Authorization: Basic $creds"
This worked in PowerShell 7.x but not PowerShell 5.x:
'Authorization: Basic ' + $creds
Their output looks the same when you create a variable from each an echo them to the terminal, but the API server does not like the latter.
Here is a good reference: https://lazyadmin.nl/powershell/concatenate-string/