2

我有这个命令:

Write-Host "123`r456" 

独立 PowerShell 中的输出:

456 

PowerShell ISE 中的输出:

123456 

谢谢。

4

1 回答 1

5

ISE 在很多方面都不像普通控制台。虽然您希望回车将位置重置为行的第一个字符,并因此给出 outout 456,但 ISE 不能以这种方式工作,因此不要依赖于这种行为。

这是 ISE 与普通控制台的未记录差异之一。记录的文件在这里:http: //blogs.msdn.com/b/powershell/archive/2009/04/17/differences-between-the-ise-and-powershell-console.aspx

于 2012-02-20T07:40:57.350 回答