Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7502221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:47:25+00:00 2026-05-29T20:47:25+00:00

Currently in PowerShell the echo command always append a newline. What would be the

  • 0

Currently in PowerShell the echo command always append a newline. What would be the equivalent for the Unix echo -n ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:47:26+00:00Added an answer on May 29, 2026 at 8:47 pm

    echo is an alias for Write-Output which sends objects to the next command in the pipeline. If all you want to do is display text on the console you can do:

    Write-Host "Hi" -NoNewLine

    Keep in mind that this is not the same cmdlet as echo|Write-Output.

    Write-Output‘s primary purpose is send objects to the next command in the pipeline where Write-Host‘s primary purpose is to display text on the console. The reason why you see text on the console using Write-Output is that the PowerShell engine sends everything to Out-Default at the end of the pipeline which sends the incoming to PowerShell’s object to text formatting engine.

    Here is an example:

    Write-Host "hi" | Get-Member
    

    This will produce an error because Write-Host just writes the text to the console and doesn’t forward the string to the next command in the pipeline.

    Write-Output "hi" | Get-Member
    

    This will display the System.String properties and methods because Write-Output sends the string object to the next object in the pipeline.

    • Write-Host: http://technet.microsoft.com/en-us/library/dd347596.aspx
    • Write-Output: http://technet.microsoft.com/en-us/library/dd315282.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am converting an old cmd command to Powershell, and currently use: START My
I'm currently working on a PowerShell script to analyse VPN traffic by reading the
I'm currently writing a library in C# and was using PowerShell to quickly test
I currently have a PowerShell script that is used for complex automated Exchange mailbox
I am currently trying to write a little powershell script (I have no experience
Im currently using C# to pass some objects to powershell and executing a method
Currently the following is my path for launching the VMware vSphere PowerCLI command prompt.
I am currently executing PowerShell scripts as follows: internal void RunScript(PowerShell powerShell, Runspace runspace,
I am currently writing a Powershell module to provide functions for installing / operating
I am currently trying to use the CloudDrive (Powershell) sample that comes with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.