Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 23, 2023 at 14:28 | comment | added | andowero | backtick is not really a good practice, since any invisible character after it breaks the code | |
| Feb 16, 2023 at 12:54 | comment | added | muzimuzhi Z | For curious like me: Powershell's official doc, page about_Parsing, secLine Continuationlearn.microsoft.com/en-us/powershell/module/… . | |
| Feb 3, 2021 at 7:47 | comment | added | Chris Smith | You can also split the strings over multiple lines with the subexpression and arithmetic operators $() and +. e.g. -dest:contentPath=$("c:\websites\xxx\wwwroot," + "computerName=192.168.1.1" + ...). A new line can follow each +. | |
| Jan 27, 2020 at 14:58 | history | edited | Myrddin Emrys | CC BY-SA 4.0 | Added important restrictions only available in the comments. |
| Feb 25, 2019 at 22:55 | comment | added | mjd2 | Backticks are brittle (as above comments state) and hard to find when parsing or reviewing a file. @StevenPenny 's answer is better if you want easier to debug code. | |
| Aug 24, 2018 at 19:16 | history | edited | Peter Mortensen | CC BY-SA 4.0 | Active reading. |
| Nov 21, 2016 at 23:35 | comment | added | RayLuo | @josh-graham And there should NOT be any space (or inline comment) AFTER the back-tick. #learned-the-hard-way | |
| Feb 15, 2016 at 14:40 | comment | added | Josh Graham | The space in front of the back-tick is required #learned-the-hard-way | |
| Oct 6, 2013 at 23:06 | comment | added | x0n | If you're running powershell 3 or higher, see github.com/lzybkr/psreadline - history traversal is fixed for multiline statements. | |
| Feb 6, 2013 at 12:16 | comment | added | Richard Ev | This seems to break command history (up arrow) functionality; as each line shows up as a separate command. Is there a way around this? | |
| Apr 9, 2010 at 14:51 | vote | accept | asgerhallas | ||
| Apr 9, 2010 at 14:17 | history | answered | Colin Pickard | CC BY-SA 2.5 |