Powershell Select -String compare always returning false
<p>I've ventured into the realm of Powershell and find myself stuck on what should be a simple task.  I'm looking to compare two strings which contain version numbers from two different files.  For some reason, my compare always returns false:</p>

<pre><code>$DLFilePath = "$PSScriptRoot\Download\Update.ini"
$SRCFilePath = "$PSScriptRoot\Original\Update.ini"

#Get File Versions
$DLVersion = Select-String $DLFilePath -pattern "\bVersion" |select line
$SRCVersion = Select-String $SRCFilePath -pattern "\bVersion" |select line

Write-Output "DL Version: " $DLVersion
Write-Output "SRC Version: " $SRCVersion     


if($DLVersion -eq $SRCVersion){
    Write-Output "Files match"

}else {
   Write-Output "Files don't match."
}


--------------Output---------------
    DL Version: 

    Line                                                                                              
    ----                                                                                              
    Version=4.5.2.1233                                                                                
    SRC Version: 
    Version=4.5.2.1233                                                                                
    Files don't match
</code></pre>

<p>Any idea why the compare is failing?  I originally thought it was because of that "\n Line \n ----"? for the first variable, but I can't figure out where that is coming from.  It only appears the first time I print either one of the variables (If I print the same variable twice in a row, it won't show up a second time), so I assume it has something to do with the output function and not the variable itself?  Also, if I step through the debug and manually print out both variables, it appears on both of them:</p>

<pre><code>[DBG]: PS C:\Users\usr\Desktop&gt;&gt; $DLVersion

Line                                                                                              
----                                                                                              
Version=4.5.2.1233                                                                                



[DBG]: PS C:\Users\usr\Desktop&gt;&gt; $SRCVersion

Line                                                                                              
----                                                                                              
Version=4.5.2.1233  
</code></pre>