title: How to access list value in Get-EC2Instance's RunningInstance method?
body: <p>I'm trying to retrieve the instanceid, public dns name, and "Name" tag from the object returned by <code>get-ec2instance</code>.</p>
  
  <pre><code>$instances = foreach($i in (get-ec2instance)) '
  { $i.RunningInstance | Select-Object InstanceId, PublicDnsName, Tag }
  </code></pre>
  
  <p>Here's the output:</p>
  
  <pre><code>InstanceId                              PublicDnsName                     Tag
  ----------                              -------------                     ---
  myInstanceIdHere                        myPublicDnsName                   {Name}
  ...                                     ...                               {Name}
  </code></pre>
  
  <p>I would like to be able to access <code>{Name}</code> using the line of code above and print its value in this output.  I've done a little bit of research since this initial posting, and found...</p>
  
  <pre><code>PS C:\Users\aneace\Documents&gt; $instances[0].Tag.GetType()
  
  IsPublic IsSerial Name                                     BaseType
  -------- -------- ----                                     --------
  True     True     List`1                                   System.Object
  </code></pre>
  
  <p>Between this and the AWS docs, <a href="http://docs.aws.amazon.com/sdkfornet/latest/apidocs/html/P_Amazon_EC2_Model_RunningInstance_Tag.htm" rel="nofollow">I think Tag refers to this list</a>, but I'm not certain.  I can access a table that prints key and value columns by calling <code>$instances[0].Tag</code>, but my problem now is that I would like that <code>Value</code> to be the output to my first table instead of the <code>{Name}</code> object.  Any suggestions?</p>