title: System.Object[] in CSV File
body: <p>I have read all I can read but I just don't get what the problem is when exporting  something from PowerShell to a CSV and getting System.Object[]</p>
  
  <p>This is just a section of code I use to extract missing updates from servers that are managed by SCCM. The Switch Array is there because I need to have the SCCM Deployment Unique ID translated into a "Friendly" name I use to identify that patching collection.</p>
  
  <p>This works fine and is displayed correcting on the screen (I just do this for testing the Switch array to ensure it is working by putting <code>$Updates</code> in the script). However, when I attempt to export to a CSVfile, I get the <code>System.Object[]</code> underneath the column titles.</p>
  
  <p>I know I could pipe the first line, then select the objects in the <code>$TargetedUpdates</code> array, and export them without any problem. But this only gives me the SCCM Deployment Unique ID with the server. I need to "resolve" this to a friendly name that makes sense in the CSV file. How can this be accomplished?</p>
  
  <pre><code>$TargetedUpdates = Get-WmiObject -Query "Select * from CCM_TargetedUpdateEX1 where UpdateState = 0" -Namespace root\ccm\SoftwareUpdates\DeploymentAgent -Computer ifdpv02 
  
  
  ForEach-Object {
  
  $MissingUpdates = $TargetedUpdates.RefAssignments.TrimEnd(";")
  
  
  $MonthlyPatch = switch ($MissingUpdates){
  
              "{0C3267EE-F343-4577-B1A3-C24FA0406DDF}" {"October 2014 Patching for Test\DEV Servers"} 
              "{D849903A-4594-4D72-9224-39DC2ABA22E}"  {"October 2014 Patching for Production Servers"}
              "{A3F0E8A2-FB2F-4045-8E22-7726007844E6}" {"October 2014 Patching for Manual Servers"} 
              "{DC3991B7-30EB-4529-AA63-537968A651D0}" {"October 2014 Patching for New Server Builds"}
              "{7C263094-4DA3-4AB8-9F79-0C169EA18D6D}" {"October 2014 Patching for Manual Test Servers"}
              "{39EDE4AD-71C9-4393-B849-498C6D677FFF}" {"October 2014 Patching for Test\SQL Servers"}
              #**********************************************************************************************
              #**********************************************************************************************
              default {"This is a System Center Endpoint Protection Update"}  
              }
  
  
  $Updates = New-Object PSobject
  $Updates | Add-Member NoteProperty Server ($TargetedUpdates.PScomputerName)
  $Updates | Add-Member NoteProperty MonthlyPatch $MonthlyPatch
  $Updates
  $Updates | Export-Csv C:\temp\test.csv -NoTypeInformation 
  
  }
  
  Invoke-Item C:\temp\test.csv 
  </code></pre>