title: Address Variables with PowerShell and Import-CSV foreach-loop
body: <p>Input file: </p>
  
  <pre><code>"Server1","lanmanserver"
  "Server2","lanmanserverTest"
  </code></pre>
  
  <p>Program</p>
  
  <pre><code>$csvFilename = "D:\Scripts\ServerMonitorConfig.csv" 
  $csv = Import-Csv $csvFilename -Header @("ServerName","ServiceName")
  
  foreach ($line in $csv) {
      Write-Host "ServerName=$line.ServerName  ServiceName=$line.ServiceName" 
      }
  </code></pre>
  
  <p>What I want: </p>
  
  <blockquote>
    <p>Server-Name=Server1  ServiceName=lanmanserver<br>
    Server-Name=Server2  ServiceName=lanmanserverT</p>
  </blockquote>
  
  <p>What I'm getting: </p>
  
  <blockquote>
    <p>ServerName=@{ServerName=Server1; ServiceName=lanmanserver}.ServerName 
    ServiceName=@{ServerName=Server1; ServiceName=lanmanserver}.ServiceN
    ame ServerName=@{ServerName=Server2;
    ServiceName=lanmanserverTest}.ServerName 
    ServiceName=@{ServerName=Server2; ServiceName=lanmanserverTest}.
    ServiceName</p>
  </blockquote>
  
  <p>I really don't care if the Headers come from the first row of the CSV or not, I'm flexible there. </p>