title: List last modified sub-directories in a directory
body: <p>I have one test directory with sub-directories:</p>
  
  <pre><code>C:\test
      - test1
            - test-1-1
                      - DIR1
                            - 1.0
            - test-1-2
                      - DIR2  =&gt; Latest modified sub dir
                            - 1.1
      - test2
            - test-2-1 
                      - DIR1  =&gt; Latest modified sub dir
                            - 1.3
            - test-2-2
                      - DIR1
                            - 1.2
  </code></pre>
  
  <p>Could be possible to output for every sub-directory in test, the name and the version of latest modified sub directory. Assuming that DIR1 or DIR2 can be any name.</p>
  
  <p>Final view to be like more:</p>
  
  <pre><code>test-1-2 1.1
  test-2-1 1.3
  </code></pre>
  
  <p>For now only output which I can get is that which get only latest <code>test*-*-*</code> but not DIR*:</p>
  
  <pre><code>gci 'C:\test' |where { $_.psiscontainer } |foreach { get-childitem $_.name |sort creationtime | select -expand name -last 1 }
  
      PS C:\test&gt; gci 'C:\test' |where { $_.psiscontainer } |foreach { get-childitem $_.name |sort creationtime | select -expand name -last 1 }
  test-1-2
  test-2-1
  </code></pre>