PowerShell ISE 4.0
In the ps1 scripts it is possible to use backtick to divide a long expression into several lines. For example:
gps|sort -Descending -Property StartTime 2>$null|select `
-First 10 -Property id,StartTime,Name|ft -AutoSize
instead of
gps|sort -Descending -Property StartTime 2>$null|select -First 10 -Property id,StartTime,Name|ft -AutoSize
Can I do the same [in the same position] in the PowerShell ISE command prompt? I tried to use ` symbol and the Alt+Enter combination, but it didn't work as I had expected [At this case PowerShell interpreted -First as a next command].
In the PowerShell ISE command prompt the next variant works fine (I had used Alt+Enter before the select alias):
gps|sort -Descending -Property StartTime 2>$null|
select -First 10 -Property id,StartTime,Name|ft -AutoSize
But I can't do the same before -First parameter instead of select. Does it mean that in the PowerShell ISE command prompt it is possible only after | operator?
ps1into command prompt will not work.