Powershell Win32_NetworkAdapterConfiguration Not "seeing" PPP Adapter

Posted by Ben on Server Fault See other posts from Server Fault or by Ben
Published on 2010-05-25T21:35:33Z Indexed on 2010/05/25 21:41 UTC
Read the original article Hit count: 610

Filed under:
|
|

I am trying to get the IP of a PPP VPN network connection, but Win32_NetworkAdapterConfiguration does not seem to "see" it.

If I interrogate all adapters using my script, it will see everything but the PPP VPN adapter. Is there a specific filter or something I need to enable, or do I need a different class?

My Script:

$colItems = Get-wmiobject Win32_NetworkAdapterConfiguration
foreach ($objItem in $colItems) {
    Write-Host Description: $objItem.Description
    Write-Host IP Address: $objItem.IPAddress
    Write-Host ""
}

Script Output:

Description: WAN Miniport (SSTP)
IP Address:

Description: WAN Miniport (IKEv2)
IP Address:

Description: WAN Miniport (L2TP)
IP Address:

Description: WAN Miniport (PPTP)
IP Address:

Description: WAN Miniport (PPPOE)
IP Address:

Description: WAN Miniport (IPv6)
IP Address:

Description: WAN Miniport (Network Monitor)
IP Address:

Description: Intel(R) PRO/Wireless 3945ABG Network Connection
IP Address: 192.168.2.5

Description: WAN Miniport (IP)
IP Address:

ipconfig /all output:

PPP adapter My VPN:

   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : My VPN
   Physical Address. . . . . . . . . : 
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.1.8.12(Preferred) 
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : 0.0.0.0
   DNS Servers . . . . . . . . . . . : 10.1.1.3
                                       10.1.1.2
   Primary WINS Server . . . . . . . : 10.1.1.2
   Secondary WINS Server . . . . . . : 10.1.1.3
   NetBIOS over Tcpip. . . . . . . . : Enabled



Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : Belkin
   Description . . . . . . . . . . . : Intel(R) PRO/Wireless 3945ABG Network Connection
   Physical Address. . . . . . . . . : 00-3F-3C-22-22-22
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.2.5(Preferred) 
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 25 May 2010 20:33:19
   Lease Expires . . . . . . . . . . : 22 May 2020 20:33:17
   Default Gateway . . . . . . . . . : 192.168.2.1
   DHCP Server . . . . . . . . . . . : 192.168.2.1
   DNS Servers . . . . . . . . . . . : 192.168.2.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Thanks in advance,

Ben

© Server Fault or respective owner

Related posts about ip

Related posts about scripting