title: Exchange script. Нow to add to the end of all lines
body: <p><code>powershell.exe -Nologo -NonInteractive -WindowStyle Hidden -NoProfile -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-ExchangeServer mx.company.org; ". 'Set-ADServerSettings -ViewEntireForest $true; Get-Mailbox -Server mx | select -expand EmailAddresses | %{$_.SmtpAddress} &gt; C:\temp\1.txt ; Get-DistributionGroup -DomainController 'dc.company.org' | select -expand EmailAddresses | %{$_.SmtpAddress} &gt;&gt; C:\temp\1.txt '""</code></p>
  
  <p>writes a list to 1.txt where only the column e-mail will be printed in the form</p>
  
  <pre><code>abc@company.ru
  bac@company.ru
  ..
  </code></pre>
  
  <p>Now what I want to achieve is to append ' OK' to each line, so that I get the following:</p>
  
  <pre><code>abc@company.ru OK
  bac@company.ru OK
  ..
  </code></pre>
  
  <p>I'm really not familiar with PowerShell, and I did not find a way to append ' OK'
  Thank you so much in advance!</p>