Using Powershell environmental variables as strings when outputting files
js2010’s answer shows the effective solution: use “…”-quoting, i.e. an expandable string explicitly. It is a good habit to form to use “…” explicitly around command arguments that are strings containing variable references (e.g. “$HOME/projects”) or subexpressions (e.g., “./folder/$(Get-Date -Format yyyy-MM)”) While such compound string arguments generally do not require double-quoting[1] – because they are … Read more