Inconsistent parameters PolicyStore PersistentStore and Dhcp Enabled

This error was driving me crazy!
I was trying to configure a team NIC with a new IP address but it would give the following error:

PS C:\users\Darryl\Desktop> new-NetIPAddress -InterfaceIndex 100 -IPAddress 192.168.0.10 -AddressFamily IPv4 -PrefixLength 24
new-NetIPAddress : Inconsistent parameters PolicyStore PersistentStore and Dhcp Enabled
At line:1 char:1
+ new-NetIPAddress -InterfaceIndex 100 -IPAddress 192.168.0.10 -AddressFamily IPv4 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_NetIPAddress:ROOT/StandardCimv2/MSFT_NetIPAddress) [New-NetIPAddress], CimException
    + FullyQualifiedErrorId : Windows System Error 87,New-NetIPAddress

Turns out the NIC cannot be disconnected when configuring the IP address.

One thought to “Inconsistent parameters PolicyStore PersistentStore and Dhcp Enabled”

  1. I found a solution to this problem.
    it’s not really clean.

    before performing the new-ipaddress

    Set-ItemProperty -Path (“HKLM: \ SYSTEM \ CurrentControlSet \ services \ Tcpip \ Parameters \ Interfaces \ {0}” -f $ netadapter.DeviceID) -Name EnableDHCP -Value 0

    after that the system no longer considers the PersistentStore DHCP as enable

    the new problem is that you will need to reset the value to 1 if you want to back to dhcp before Set-NetIPInterface -Dhcp Enabled.

Leave a Reply

Your email address will not be published. Required fields are marked *