Why can I successfully add an IP address with this command
New-NetIPAddress -IPAddress 192.168.0.168 -PrefixLength 24 -InterfaceIndex 34
but the same command fails for persistent address
New-NetIPAddress -IPAddress 192.168.0.168 -PrefixLength 24 -InterfaceIndex 34 -PolicyStore PersistentStore
New-NetIPAddress : Invalid parameter PolicyStore PersistentStore
At line:1 char:1
+ New-NetIPAddress -IPAddress 192.168.0.168 -PrefixLength 24 -Interface ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_NetIPAddress:ROOT/StandardCimv2/MSFT_NetIPAddress) [New-NetIPAddress], CimException
+ FullyQualifiedErrorId : Windows System Error 87,New-NetIPAddress
Running in PowerShell 5.1 as Administrator.
As Greg Askew explained in the comments, PolicyStore is irrelevant for New-NetIPAddress command even though it's an officially documented command argument.
This command
creates persistent IP address anyways.