# Get-NetIPConfiguration on Powershell V2

**URL:** <https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753>\
**Category:** PowerShell Help\
**Created:** [August 4, 2020, 4:48am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753 "2020-08-04T04:48:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![izshell](https://avatars.discourse-cdn.com/v4/letter/i/3bc359/32.png) [@izshell](https://forums.powershell.org/u/izshell)\
**Post date:** [August 4, 2020, 4:48am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/1 "2020-08-04T04:48:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 4, 2020, 6:13am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/2 "2020-08-04T06:13:31Z")

</div>

[https://powershell.org/forums/topic/get-windowsfeature-but-with-powershell-version-2/](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.

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [August 4, 2020, 6:47am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/3 "2020-08-04T06:47:36Z")

</div>

Looking at [Get-NetIPConfiguration](https://docs.microsoft.com/en-us/powershell/module/nettcpip/get-netipconfiguration?view=win10-ps) 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:

> **[Performing Networking Tasks - PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/samples/performing-networking-tasks?view=powershell-7)**
>
> This article shows how to use WMI classes in PowerShell to manage network configuration setting in Windows.

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
```

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [August 4, 2020, 7:23am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/4 "2020-08-04T07:23:25Z")

</div>

How can I delete this?

---

<div class="post-metadata">

**Author:** ![izshell](https://avatars.discourse-cdn.com/v4/letter/i/3bc359/32.png) [@izshell](https://forums.powershell.org/u/izshell)\
**Post date:** [August 4, 2020, 7:39am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/5 "2020-08-04T07:39:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [August 4, 2020, 10:15am UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/6 "2020-08-04T10:15:49Z")

</div>

@Dough Just use white out on the screen. 🙂

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/get-netipconfiguration-on-powershell-v2/14753/7 "2024-05-16T20:29:05Z")

</div>

Closed on May 16, 2024, 8:29pm UTC


