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.

7 thoughts 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.

  2. gci -Path “HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\” | Set-ItemProperty -Name EnableDhcp -Value 0

  3. I found that although an “Inconsistent parameters…” error is thrown, the IP Address, Subnet Mask and Default Gateway addresses were set successfully. Therefore I programmed around the error, considering it a success.

  4. I eventually found out the reason I was getting “Inconsistent parameters…” error when using New-NetIPAddress to try and set IP addresses on a 2012 R2 Team.
    I had mistakenly thought that the network connections, Ethernet, Ethernet 2 etc would consistently map to the same physical NIC every time I built my server, but they don’t. Hence I had teamed two NICs that were in different VLans and were effectively reporting that they were disconnected, hence the “Inconsistent parameters…” error.
    You can use Get-NetAdapterHardwareInfo to consistently map physical NICs.
    Hope this helps someone.

  5. I was getting the error with the NIC connected and found this stopped the error.

    Set-NetIPInterface -InterfaceAlias $nicAlias -DHCP Disabled

Leave a Reply

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