title: Powershell iterate System.Object
body: <p>I am using OpenShift CLI in a PowerShell Script,</p>
  <p>I have a variable $ProjectList with Data. Not sure of its datatype, but doing $ProjectsList.GetType() gives me below</p>
  <pre class="lang-text prettyprint-override"><code>IsPublic IsSerial Name                                     BaseType
  -------- -------- ----                                     --------
  True     True     Object[]                                 System.Array
  </code></pre>
  <p>Looking for a way to Get Name field whose status is running</p>
  <pre class="lang-text prettyprint-override"><code>NAME                                             READY   STATUS             AGE
  Service One                                     0/1     Completed            13d
  Service Two                                     0/1     Running              13d
  Service 3                                       0/1     Running              13d
  Service 4                                       0/1     Completed            13d
  </code></pre>
  <p><code>$ProjectList.Length</code> give me the value 5.</p>
  <p>I am looking for a way to get the Name whole status is Running. Tried below code but it does not work.</p>
  <pre class="lang-sh prettyprint-override"><code>$ProjectsList = c:\TEMP\oc.exe get pods
  $FilteredList = $ProjectList.Where{ $_.STATUS -eq 'Running' }
  
  write-host $FilteredList //This shows empty
  </code></pre>
  <p>Can you help me with some pseudo code.</p>