title: Select one property from multiple expanded properties
body: <p>Below is a script which is using expand property on <code>get-childitem</code></p>
  
  <p><code>Get-ChildItem Cert:\LocalMachine\my | select  dnsnamelist</code></p>
  
  <p>gives me output like below</p>
  
  <pre><code>DnsNameList                  
  -----------                  
  {localhost}
  </code></pre>
  
  <p>so i used expand property to expand it</p>
  
  <pre><code>Get-ChildItem Cert:\LocalMachine\my | select -ExpandProperty dnsnamelist -Property notafter
  </code></pre>
  
  <p>Which gives me output like below</p>
  
  <pre><code>NotAfter             Punycode                    Unicode                    
  --------             --------                    -------                    
  5/24/2023 5:30:00 AM localhost                   localhost   
  </code></pre>
  
  <p>So i need only one property,either unicode or punycode,so below is what i did</p>
  
  <pre><code>    Get-ChildItem Cert:\LocalMachine\my | 
  select -ExpandProperty dnsnamelist -Property notafter | 
  Select-Object -ExcludeProperty punycode
  </code></pre>
  
  <p>But this still gives me unicode and puny code both,how to get only one..</p>
  
  <p>My last pipeline has asked to exclude punycode property,why this doesnt work ?</p>