4
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

Itchydon
  • 144
  • 6
vicky
  • 45
  • 4

1 Answers1

0

You can test your command by changing the -AddressFamily to IPv4 in order to see if you get output. I have seen this error previously when DHCP was NOT assigning IPv6 addresses to hosts.

If your IPv4 DHCP functions properly my suspicion would be that this host is NOT recieving IPv6 address assignments. More than likely, the DHCP scope is not configured to assign IPv6 addresses. By default, DHCP on Microsoft platforms does not issue IPv6 address assignments.

Citizen
  • 1,103
  • 1
  • 10
  • 19