I\'m using a powershell script to generate a config file with database passwords and the like. The normal use of this script is to generate-and-use a password, but for a fle
I'm running firebase
using a powershell script. I solved the problem by using triple double-quotes like this: firebase deploy --token "$firebaseToken" --project "$firebaseProject" --message """$releaseMessage"""
. The URL is in the $releaseMessage
, and the ampersand does't cause a problem anymore
powershell .\makeConfig.ps1 -password "'xxx<xxxx;xxxxx&x.xxxx}xx/xxx'" -otherparam 3
Here
"
double quotes would escape all cmd
poisonous characters e.g. <
, &
etc. excepting "
itself and %
percentage sign (and !
exclamation mark if delayed expansion is enabled) while '
apostrophes (single quotes) would escape all powershell
ones (excepting '
apostrophe itself).However, exceptions noticed above could be escaped as well… Based on both Escape characters, Delimiters and Quotes articles: