I have this command:
Write-Host "123`r456"
Output in stand-alone PowerShell:
456
Output in PowerShell ISE:
123456
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The ISE doesn’t behave like a normal console in many ways. While you would expect the carriage return to reset the position to the first character of a line, and hence give the outout
456, the ISE does not work that way, so do not depend on that behaviour.This is one of the undocumented differences of ISE from the normal console. Documented ones are here: http://blogs.msdn.com/b/powershell/archive/2009/04/17/differences-between-the-ise-and-powershell-console.aspx