Windows 10 WMI / CIM DHCP Information Wrong?

  • Thread starter Thread starter Karl_Amber
  • Start date Start date
K

Karl_Amber

Guest
I was automating some network functionality & reporting w/ PowerShell and needed to evaluate the DHCP Lease time values. Using WMI / CIM - the Win32_NetworkAdapterConfiguration class returns incorrect data.

Using IP Config returns the correct data.

I can validate that this is occurring on multiple Windows 10 machines.

Is there a known fix for this?

Karl

Caption OSArchitecture BuildNumber
------- -------------- -----------
Microsoft Windows 10 Pro 64-bit 17763


PS C:\WINDOWS\system32> Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where index -eq 1 | select *DHCP*


Description : Intel(R) Ethernet Connection I217-LM
DHCPEnabled : True
DHCPLeaseExpires : 7/2/1932 10:50:03 PM
DHCPLeaseObtained : 7/1/1932 10:50:03 PM
DHCPServer : 192.168.1.1
Index : 1



PS C:\WINDOWS\system32> ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : HP-ELITEDESK
Primary Dns Suffix . . . . . . . : lab.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : lab.local

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Ethernet Connection I217-LM
Physical Address. . . . . . . . . : 2C-44-FD-2E-DE-15
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.85(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday, April 20, 2019 12:28:22 PM
Lease Expires . . . . . . . . . . : Sunday, April 21, 2019 12:50:21 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1

More...
 
Back
Top