Powershell: Configure a static IP on an unplugged NIC

You need to remove the existing DHCP IP address already assigned to the adapter. You should also set the DNS server for the interface. I provided an example below, but replace the xxx.xxx.xxx.xxx with your DNS Server IP Address.

You'll need to disable DHCP in the registry for this interface in the PersistentStore before you can set the IP address.

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$((Get-NetAdapter -InterfaceIndex 10).InterfaceGuid)” -Name EnableDHCP -Value 0
Remove-NetIpAddress -InterfaceIndex 10 -AddressFamily IPv4
Remove-NetRoute -InterfaceIndex 10 -AddressFamily IPv4 -Confirm:$false
New-NetIpAddress -InterfaceIndex 10 -IpAddress 192.168.9.10 -PrefixLength 24 -DefaultGateway 192.168.9.1 -AddressFamily IPv4
Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses "xxx.xxx.xxx.xxx"

This website has a good example and explanation of the process: https://www.pdq.com/blog/using-powershell-to-set-static-and-dhcp-ip-addresses-part-1/

This website talks about the same problem you're having and their solution: http://www.darrylvanderpeijl.com/inconsistent-parameters-policystore-persistentstore-and-dhcp-enabled/