Windows IPv6 Management
Windows IPv6 Management
# View IPv6 addresses, filter out link-local addresses, filter out Loopback addresses
Get-NetIPAddress -AddressFamily IPv6 | Where-Object {$_.IPAddress -notlike "fe80*" -and $_.IPAddress -notlike "::1"} | Format-Table -AutoSize
# View IPv6 routes
Get-NetRoute -AddressFamily IPv6
# View IPv6 neighbors
Get-NetNeighbor -AddressFamily IPv6
# View interfaces
Get-NetAdapter
# Enable temporary IPv6 addresses
Set-NetIPv6Protocol -UseTemporaryAddress Enabled
# Get interface information
Get-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet | Select-Object -Property *
Get-NetIPv6Protocol
# Set interface information, solve Windows IPv6 address not updating issue
Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -Dhcp Disabled
Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -AdvertiseDefaultRoute Disabled
Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -IgnoreDefaultRoutes Enabled
# Manually restore IPv6 access
# Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -RouterDiscovery Disabled
# Set-NetIPInterface -AddressFamily IPv6 -ifAlias Ethernet -RouterDiscovery Enabled
Set-NetIPv6Protocol -DhcpMediaSense Disabled
Set-NetIPv6Protocol -RandomizeIdentifiers Disabled
Set-NetIPv6Protocol -UseTemporaryAddresses Disabled
Set-NetIPv6Protocol -MaxTemporaryDesyncTime 0:3:0
Set-NetIPv6Protocol -MaxTemporaryPreferredLifetime 0:10:0
Set-NetIPv6Protocol -MaxTemporaryValidLifetime 0:30:0
Set-NetIPv6Protocol -TemporaryRegenerateTime 0:0:30