title: Powershell: Filtering unwanted values from get-wmiobject win32_product
body: <p>I'm trying to get the list of installed applications on a machine into a Listbox and so far I have this:</p>
  <pre><code>function programsinstalled_current
  {
  $prog = get-wmiobject win32_product -computer summer -Property Name | select Name
  foreach($program in $prog)
  {
  [Void]$program_list_current.items.add($program)
  }
  }
  </code></pre>
  <p>and it returns this in the list box:</p>
  <p><img src="https://i.stack.imgur.com/MturB.jpg" alt="enter image description here" /></p>
  <p>My question is how do I get rid of the unwanted '@{name=' at the start of each program name and the '}' at the end of each name?</p>
  <p>I've tried the below code with getting the AD groups of a machine into Listbox and it works fine, but the same syntax won't work the <code>get-wmiobject win32_product</code>:</p>
  <pre><code>function fill_current_list
  {
  $processnames_t = (Get-ADComputer -Identity $current_hostname.text -Property MemberOf).MemberOf 
  foreach ($processname in $processnames_t)
  {
  [void]$AD_list_current.Items.Add($processname)
  } 
  </code></pre>
  <p>If possible, I'd rather not use <code>-replace</code></p>
  <p>Thanks</p>