title: Merge two PSCustomObjects into one- PowerShell
body: <p>I need help in PowerShell to combine two outputs or two PSCustomObjects into One.
  For example,</p>
  <pre><code>$services = Get-Service | Select Name, Starttype,Status
  $processes = Get-Process | Select ID
  </code></pre>
  <p>I need the output with the table headers
  <strong>Name, Starttype, Status, ID</strong></p>
  <p>I have already tried creating CSV and joining them but the problem is Process ID starts when the entire output ends for the services. I need them to a parallel.</p>
  <p>Second I have tried to create PSCustomObjects but no luck.</p>
  <p>Please help me with the PowerShell code.</p>
  <p>Actual code that I'm trying to achieve.</p>
  <pre><code>**$exclusionItems = @()
  $OasHighItems = @()   
  foreach($item in $items){
      $exclusionItems  += [PSCustomObject]@{
          EXCLUSION_BY_NAME_OR_LOCATION = $item.EXCLUSION_BY_NAME_OR_LOCATION
          EXCLUSION_EXCLUDE_SUBFOLDERS = $item.EXCLUSION_EXCLUDE_SUBFOLDERS
          EXCLUSION_ON_READ= $item.EXCLUSION_ON_READ
      }
      
  }
  foreach($oas in $oashigh){
      $oashighItems += [PSCustomObject]@{
          OAS_PROCESSES_LIST = $oas
      }
  }
  $Array = @()
  $Array = $exclusionItems,$oashighItems
  $Array | Update-FirstObjectProperties | Export-Excel $ExcelParams -TableName Table -Show**
  </code></pre>