Brilliant!!
And thanks to Alex's post a little later, found 'Name' on the NetworkAdaptor
which is what I wanted - mapping from netconnectionid to name - once I know
what the objects call them
netconnectionid Name
> gwmi win32_NetworkAdapter -filter "netconnectionid is not null" | select netconnectionid,Name | ft -auto
--------------- ----
Enterprise Broadcom BCM5708S NetXtreme II GigE (NDIS VBD Client)
Private Broadcom BCM5708S NetXtreme II GigE (NDIS VBD Client) #2
Now I have to figure how this power-shell stuff. First time using it. Yet
anoter scripting language to learn
Thanks for all the help folks.
Perry
"Shay Levy [MVP]" wrote:
> Hi pschmidt,
>
> It's a combination on two WMI calls (I'm sure one can merge them into one):
>
>
>
> PS > gwmi Win32_NetworkAdapter -filter "netconnectionid is not null"| select
> netconnectionid,interfaceindex | ft -auto
>
>
> netconnectionid interfaceindex
> --------------- --------------
> Local Area Connection 10
> Bluetooth Network Connection 13
> Wireless Network Connection 14
> Local Area Connection 19
>
>
>
>
> Now you can issue a second WMI call to the interface you need:
>
> PS > gwmi Win32_NetworkAdapterConfiguration -filter "interfaceindex=10"
>
> DHCPEnabled : True
> IPAddress :
> DefaultIPGateway :
> DNSDomain :
> ServiceName : e1express
> Description : Intel(R) 82566MM Gigabit Network Connection
> Index : 4
>
>
>
> ---
> Shay Levy
> Windows PowerShell MVP
> http://blogs.microsoft.co.il/blogs/ScriptFanatic
>
>
>
> p> I'm trying to find a way to list the network adapter information
> p> based on the ethernet adapter as listed by ipconfig - the 'defaults'
> p> are 'Local Area Connection', Local Area Connection 2', etc...
> p>
> p> I've found lots of info using Win32_NetworkAdapterConfiguration, and
> p> this gets me most of what I want. But I can't find the 'name' in
> p> this object. How do I get this name? Or is there a way I can get
> p> the NICs Win32_NetworkAdapterConfiguration object with the given
> p> name. Either will work with with I'm doing.
> p>
> p> Thx,
> p>
> p> Perry
> p>
>
>
>



