Get-NetIPConfiguration on Powershell V2

Hello!

I wrote a script to get network details using Get-the NetIPConfiguration command.
This way I can individually take the IPV6,IPV6, and Alias for each Interface.

Is there a way I can do this with V2?
I am struggling to find anything that resembles a set of individualized interfaces.

https://powershell.org/forums/topic/get-windowsfeature-but-with-powershell-version-2/

Powershell v 2 had quite limitted functionality. And because it’s not supported anymore you will find less and less help. If you cannot avoid doing some tasks on a windows non supported windows version you should at least update your Powershell version. That will save you from a lot of wasted time and frustration.

Looking at Get-NetIPConfiguration documentation, it uses CimSession. Basically, this a wrapper for WMI\CIM Win32_NetworkAdapterConfiguration.

Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property * | Select *

This discusses getting network information with Powershell:

https://docs.microsoft.com/en-us/powershell/scripting/samples/performing-networking-tasks?view=powershell-7

The wrappers get information from multiple places to make it simple for consumption rather than just raw data. The configuration is closely associated with the adapter, so you would probably use both to get comparable output:

$config = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property * | 
          Select Index,
                 Description, 
                 DHCPEnabled, 
                 IPEnabled, 
                 Caption, 
                 SettingId,
                 InterFaceIndex, 
                 MacAddress, 
                 ServiceName

$adapter = Get-CimInstance -ClassName Win32_NetworkAdapter -Property * | 
           Select Availability, 
                  Name, 
                  DeviceId, 
                  Caption, 
                  Description,
                  Speed,
                  AdapterType, 
                  Guid,
                  Index, 
                  Installed, 
                  InterFaceIndex, 
                  MacAddress, 
                  Manufacturer, 
                  NetConnectionId, 
                  NetConnectionStatus, 
                  NetEnabled,
                  PhysicalAdapter,
                  ProductName,
                  ServiceName

Just need to figure out how to join the objects, like Index\DeviceId:

PS C:\Users\rasim> $config | Where{ $_.index -eq 5}


Index          : 5
Description    : Intel(R) Wireless-AC 9260 160MHz
DHCPEnabled    : True
IPEnabled      : True
Caption        : [00000005] Intel(R) Wireless-AC 9260 160MHz
SettingId      : {53B276CA-118A-4C2D-9E51-A67057BE7E44}
InterFaceIndex : 9
MacAddress     : 19:1D:EC:F5:E6:D2
ServiceName    : Netwtw08




PS C:\Users\rasim> $adapter | Where{$_.DeviceId -eq 5}


Availability        : 3
Name                : Intel(R) Wireless-AC 9260 160MHz
DeviceId            : 5
Caption             : [00000005] Intel(R) Wireless-AC 9260 160MHz
Description         : Intel(R) Wireless-AC 9260 160MHz
Speed               : 58500000
AdapterType         : Ethernet 802.3
Guid                : {53B276CA-118A-4C2D-9E51-A67057BE7E44}
Index               : 5
Installed           : True
InterFaceIndex      : 9
MacAddress          : 19:1D:EC:F5:E6:D2
Manufacturer        : Intel Corporation
NetConnectionId     : Wi-Fi
NetConnectionStatus : 2
NetEnabled          : True
PhysicalAdapter     : True
ProductName         : Intel(R) Wireless-AC 9260 160MHz
ServiceName         : Netwtw08

How can I delete this?

Thank you @Rob Simmers!
I appreciate your indepth responce!

@Dough Just use white out on the screen. :slight_smile: