title: How do I remove newline from a PowerShell variable
body: <p>I'm trying to do some processing logic - running some commands in parallel based on the tree configuration CSV file:</p>
  
  <pre><code>Operation;Parent;Enabled;Propagated;Job_ID;Status;Started;Finished
  CA1;n/a;Y;N;;;;
  PROD1;n/a;Y;N;;;Y;
  CON1;CA1;N;N;;;Y;
  CON2;CON1;N;N;;;Y;
  </code></pre>
  
  <p>I load the file into the variable and then I'm trying to find the next step which needs to be processed:</p>
  
  <pre><code>$Data = Import-Csv -delimiter ";" .\config.csv
  $NextStep = $Data | Select-Object -first 1 | Where-Object {$_.Started -eq ""}
  $NextStepText = $NextStep.Operation | ft -autosize | out-string
  </code></pre>
  
  <p>The problem is that it seems like $NextStep.Operation contains new line character. When I display it I get:</p>
  
  <pre><code>PS C:\temp\SalesForce&gt; $NextStep.operation
  CA1
  
  PS C:\temp\SalesForce&gt; $NextStep.Operation.Contains("`n")
  False
  </code></pre>
  
  <p>Do you know what I'm doing wrong? I would like to display the content without the "dummy" new line character which is there even if contains method is saying it is not there.</p>
  
  <p>Or please advise how to do it better. I'm still learning PowerShell; so far I just google the commands, and I'm trying to put it together.</p>