Get-NetIPAddress -AddressFamily IPv6 -AddressState Preferred -SuffixOrigin DHCP | Select IPAddress
I am facing the error below while executing above script. It shows the correct IPv6 configurations for some details but for some servers it is showing below error,
Can someone explain what suffixorigin DHCP indicates and why it is showing below error on some severs? Is IPv6 not enabled on those machines or is DHCP is not configured with IPv6 address?
Below error which we receive most commonly and the IPv6 Address field is Empty
Get-NetIPAddress : No matching MSFT_NetIPAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_NetIPAddress class on the CIM server: SELECT * FROM MSFT_NetIPAddress WHERE ((AddressFamily = 23)) AND ((SuffixOrigin = 3)) AND ((AddressState = 4)). Verify query parameters and retry. At C:\ProgramData\Nexthink\RemoteActions\Scripts\System{2CC0A4D5-9D34-40F9-939D-1EA45AA63609}.ps1:28 char:11 + $ipv6 = ( Get-NetIPAddress -AddressFamily IPv6 -AddressState Preferre ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFT_NetIPAddress:String) [Get-NetIPAddress], CimJobException + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Get-NetIPAddress
Unable to write output 'IPV6Address' with given value '' interpreted as System.String: Object reference not set to an instance of an object. Warning: output '' has not been set by script