Unable to Create a table of Array of Objects in Powershell -


i need following. trying list adapter name , netbiosoption value in table format. appreciated.

  $nac = gwmi win32_networkadapterconfiguration -filter 'ipenabled="true"'    $na = $nac | %{$_.getrelated('win32_networkadapter')}   $prop = @{'name' = $na.netconnectionid;         'netbios' = $nac.tcpipnetbiosoptions          }   $obj = new-object -typename psobject -property $prop   $obj 

i getting result , not in table format

name                                                                                       netbios                                                                                    ----                                                                                       -------                                                                                    {wireless network connection, virtualbox host-only network}                                {0, 0}   

try this:

$nac = gwmi win32_networkadapterconfiguration -filter 'ipenabled="true"'  $nac | %{   new-object psobject -property @{    name = $_.getrelated('win32_networkadapter')    netbios = $_.tcpipnetbiosoptions   } } 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -