title: powershell write in csv
body: <p>Is any way to write text in last column of csv file? without &quot;&quot;</p>
  <pre><code>if ($inputID -eq $entry.HostName){
  
      &quot;$inputID Ok!&quot;
  }
  else{
  
      &quot;$inputID doesn't exist in database!&quot;
  
      $title    = 'Collector _ HostName'
      $question = 'Add new ID in csv database?'
      $choices  = '&amp;Yes', '&amp;No'
  
  $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1)
      if ($decision -eq 0) {
      Write-Host 'confirmed'
  
      $ID = Read-Host -Prompt &quot;TypeID&quot;
      $IP = Read-Host -Prompt &quot;TypeIP&quot;
  
  $wrapper = New-Object PSObject -Property @{ HostName = $ID; IP = $IP }
  Export-Csv -Append -InputObject $wrapper -Path &quot;.\test.csv&quot; -NoTypeInformation -Force 
  $dbTrimmer = Get-Content -Path &quot;.\test.csv&quot;
  $dbTrimmer.Replace('&quot;,&quot;',&quot;,&quot;).TrimStart('&quot;').TrimEnd('&quot;') | Out-File &quot;.\test.csv&quot; -Force -Confirm:$false
      Exit
      }
      else{
      Write-Host 'No'
      Exit
      }
  }
  </code></pre>
  <p>csv looks like this</p>
  <pre><code>ID,IP
  ABC,10.10.10.10
  </code></pre>
  <p>In this moment my script can write in csv but delete an old info in csv</p>
  <pre><code>&quot;FirstColumn&quot;,&quot;SecondColumn&quot;
  &quot;ABCD&quot;,&quot;10.10.10.10&quot;
  </code></pre>
  <p>Thank you</p>