title: How can i convert the output of prnmngr into custom object?
body: <p>output of <code>cscript prnmngr.vbs -l</code></p>
  
  <pre><code>Server name abcd 
  Printer name \\abcd.com\mailroom
  Share name mailroom
  Driver name Canon iR-ADV 4225/4235 UFR II
  Port name mailroom.com
  Comment
  Location
  Print processor winprint
  Data type RAW
  Parameters
  Attributes 536
  Priority 1
  Default priority 0
  Average pages per minute 0
  Printer status Idle
  Extended printer status Unknown
  Detected error state Unknown
  Extended detected error state Unknown
  
  Server name cdef 
  Printer name \\cdfet.com\mailroom3
  Share name mailroom3
  Driver name Canon iR-ADV 4225/4235 UFR II
  Port name mailroomxxx.com
  Comment
  Location
  Print processor winprint
  Data type RAW
  Parameters
  Attributes 536
  Priority 1
  Default priority 0
  Average pages per minute 0
  Printer status Idle
  Extended printer status Unknown
  Detected error state Unknown
  Extended detected error state Unknown
  </code></pre>
  
  <p>something like (note the modified output property names): </p>
  
  <pre><code>$CustomPrinterobjects = New-Object –TypeName PSObject
  $CustomPrinterobjects | Add-Member –MemberType NoteProperty –Name ComputerName –Value "$a" 
  $CustomPrinterobjects | Add-Member –MemberType NoteProperty –Name Name –Value "$b" 
  $CustomPrinterobjects | Add-Member –MemberType NoteProperty –Name ShareName –Value "$c" 
  $CustomPrinterobjects | Add-Member –MemberType NoteProperty –Name DriverName –Value "$d"
  $CustomPrinterobjects | Add-Member –MemberType NoteProperty –Name PortName –Value "$e"
  </code></pre>
  
  <p>where <code>$a</code>, <code>$b</code>, <code>$c</code>,<code>$d</code>, <code>$e</code> represent property values looped over the output of <code>cscript prnmngr.vbs -l</code></p>