2

Extension of this question... How do you write a multi-line command in Powershell ISE? Backtick does not work.

I'm talking about the command prompt window C:\>

Community
  • 1
  • 1
Kellen Stuart
  • 7,775
  • 7
  • 59
  • 82
  • 1
    https://msdn.microsoft.com/en-us/powershell/scripting/getting-started/fundamental/exploring-the-windows-powershell-ise -> "*Press SHIFT+ENTER to enter each line of a multiline command, and press ENTER after the last line to execute the multiline command.*" – TessellatingHeckler Apr 25 '17 at 19:46
  • 1
    Are you asking about the *scripting* window or the *command* window? The backtick (`) does work in the scripting window. For the command window, Joey's answer is correct. – JamesQMurphy Apr 25 '17 at 19:57
  • http://windowsitpro.com/blog/breaking-lines-powershell-lose-backtick If there's any white space after the backtick - a space or tab, for example - then THAT will be escaped, not the carriage return. That fact makes it very easy to mess up when you're typing a command in, with the result being improper execution and unexpected error messages. – Adamar Apr 26 '17 at 04:58

1 Answers1

7

Press Shift+Return to enter multiple lines. Just Return will execute it.

Joey
  • 344,408
  • 85
  • 689
  • 683