<p>I'm missing something here:</p>

<pre><code>$objSearcher = New-Object System.DirectoryServices.DirectorySearcher  
$objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry  
$objSearcher.Filter = ("(objectclass=computer)")  
$computers = $objSearcher.findall()  
</code></pre>

<p>So the question is why do the two following outputs differ?</p>

<pre><code>$computers | %{ 
"Server name in quotes $_.properties.name" 
"Server name not in quotes " + $_.properties.name 
}
PS&gt; $computers[0] | %{"$_.properties.name"; $_.properties.name}
System.DirectoryServices.SearchResult.properties.name
GORILLA
</code></pre>

[{'answer_id': 13760, 'author': 'EBGreen', 'author_id': 1358, 'author_profile': 'https://Stackoverflow.com/users/1358', 'pm_score': 0, 'selected': False, 'text': '<p>I believe it has to do with the way that PS interpolates information in the "". Try this:</p>\n\n<p>"Server name in quotes $($_.properties).name" </p>\n\n<p>Or you may even need one more set of $(). I\'m not somewhere that I can test it at right now.</p>\n'}, {'answer_id': 13878, 'author': 'slipsec', 'author_id': 1635, 'author_profile': 'https://Stackoverflow.com/users/1635', 'pm_score': 0, 'selected': False, 'text': '<p>Close-- The below works correctly, but I\'d be interested if anyone has a deeper explanation.</p>\n\n<pre><code>PS C:\\&gt; $computers[0] | %{ "$_.properties.name"; "$($_.properties.name)" }\nSystem.DirectoryServices.SearchResult.properties.name\nGORILLA\n</code></pre>\n\n<p>So it would seem that $_.properties.name doesn\'t deference like I expected it to.  If I\'m visualizing properly, the fact that the name property is multivalued causes it to return an array.  Which (I think) would explain why the following works:</p>\n\n<pre><code>$computers[0] | %{ $_.properties.name[0]}\n</code></pre>\n\n<p>If "name" were a string this should return the first character, but because it\'s an array it returns the first string. </p>\n'}, {'answer_id': 13972, 'author': 'Steven Murawski', 'author_id': 1233, 'author_profile': 'https://Stackoverflow.com/users/1233', 'pm_score': 2, 'selected': True, 'text': '<p>When you included $_.properties.name in the string, it was returning the type name of the property.  When a variable is included in a string and the string is evaluated, it calls the ToString method on that object referenced by the variable (not including the members specified after).  </p>\n\n<p>In this case, the ToString method is returning the <strong>type name</strong>.  You can force the evaluation of the variable and members similar to what EBGreen suggested, but by using </p>\n\n<pre><code>"Server name in quotes $($_.properties.name)"  \n</code></pre>\n\n<p>In the other scenario <strong>PowerShell</strong> is evaluating the variable and members specified first and then adding it to the previous string.</p>\n\n<p>You are right that you are getting back a collection of properties.  If you pipe <strong>$computer[0].properties</strong> to get-member, you can explore the object model right from the command line.  </p>\n\n<p>The important part is below.</p>\n\n<blockquote>\n  <p>TypeName: System.DirectoryServices.ResultPropertyCollection</p>\n  \n  <p>Name                    MemberType            Definition</p>\n  \n  <hr>\n  \n  <p>Values            Property              System.Collections.ICollection Values {get;}</p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/13753', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1635/']