IPv6 PowerShell Cheat-Sheet (Windows): Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Die Seite wurde neu angelegt: „\== IPv6 PowerShell Cheat-Sheet (Windows) == \=== Interfaces & Status === \*Get-NetIPInterface -AddressFamily IPv6 \*Get-NetIPInterface -AddressFamily IPv6 |…“
 
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
\== IPv6 PowerShell Cheat-Sheet (Windows) ==
=== Interfaces & Status ===
*Get-NetIPInterface -AddressFamily IPv6
*Get-NetIPInterface -AddressFamily IPv6 | Format-Table ifIndex,InterfaceAlias,ConnectionState,InterfaceMetric,RouterDiscovery
*Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
*Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
*Get-NetIPConfiguration -Detailed


\=== Interfaces & Status ===
=== Adressen anzeigen & verwalten ===
\*Get-NetIPInterface -AddressFamily IPv6
*Get-NetIPAddress -AddressFamily IPv6
\*Get-NetIPInterface -AddressFamily IPv6 | Format-Table ifIndex,InterfaceAlias,ConnectionState,InterfaceMetric,RouterDiscovery
*Get-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6
\*Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms\_tcpip6
*New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:db8:1::10 -PrefixLength 64 -DefaultGateway 2001:db8:1::1
\*Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms\_tcpip6
*Remove-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:db8:1::10 -Confirm:$false
\*Get-NetIPConfiguration -Detailed
*New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress fe80::10 -PrefixLength 64 -AddressFamily IPv6 -Type Unicast # Link-Local manuell
*Set-NetIPv6Protocol -UseTemporaryAddresses Enabled # Privacy Extensions
*Set-NetIPv6Protocol -UseTemporaryAddresses Disabled
*Set-NetIPv6Protocol -RandomizeIdentifiers Enabled
*Set-NetIPv6Protocol -RandomizeIdentifiers Disabled


\=== Adressen anzeigen & verwalten ===
=== DNS (AAAA/Resolver) ===
\*Get-NetIPAddress -AddressFamily IPv6
*Resolve-DnsName example.com -Type AAAA
\*Get-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6
*Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
\*New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001\:db8:1::10 -PrefixLength 64 -DefaultGateway 2001\:db8:1::1
*Get-DnsClientServerAddress -AddressFamily IPv6
\*Remove-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001\:db8:1::10 -Confirm:\$false
*Clear-DnsClientCache
\*New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress fe80::10 -PrefixLength 64 -AddressFamily IPv6 -Type Unicast  # Link-Local manuell
\*Set-NetIPv6Protocol -UseTemporaryAddresses Enabled  # Privacy Extensions
\*Set-NetIPv6Protocol -UseTemporaryAddresses Disabled
\*Set-NetIPv6Protocol -RandomizeIdentifiers Enabled
\*Set-NetIPv6Protocol -RandomizeIdentifiers Disabled


\=== DNS (AAAA/Resolver) ===
=== Routing ===
\*Resolve-DnsName example.com -Type AAAA
*Get-NetRoute -AddressFamily IPv6
\*Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
*Get-NetRoute -AddressFamily IPv6 | Sort-Object RouteMetric | Format-Table DestinationPrefix,NextHop,InterfaceAlias,RouteMetric
\*Get-DnsClientServerAddress -AddressFamily IPv6
*New-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001:db8:1::1 -RouteMetric 20
\*Clear-DnsClientCache
*Remove-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001:db8:1::1 -Confirm:$false
*Test-NetConnection -ComputerName 2001:db8:1::1 -DiagnoseRouting


\=== Routing ===
=== Neighbor Discovery (NDP) ===
\*Get-NetRoute -AddressFamily IPv6
*Get-NetNeighbor -AddressFamily IPv6
\*Get-NetRoute -AddressFamily IPv6 | Sort-Object RouteMetric | Format-Table DestinationPrefix,NextHop,InterfaceAlias,RouteMetric
*Get-NetNeighbor -InterfaceAlias "Ethernet" -State Stale
\*New-NetRoute -DestinationPrefix 2001\:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001\:db8:1::1 -RouteMetric 20
*Remove-NetNeighbor -InterfaceAlias "Ethernet" -IPAddress fe80::aabb:ccff:fedd:ee11 -Confirm:$false
\*Remove-NetRoute -DestinationPrefix 2001\:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001\:db8:1::1 -Confirm:\$false
\*Test-NetConnection -ComputerName 2001\:db8:1::1 -DiagnoseRouting


\=== Neighbor Discovery (NDP) ===
=== Router Advertisements / SLAAC Schalter (Interface) ===
\*Get-NetNeighbor -AddressFamily IPv6
*Get-NetIPInterface -AddressFamily IPv6 | Format-Table InterfaceAlias,RouterDiscovery,Advertising
\*Get-NetNeighbor -InterfaceAlias "Ethernet" -State Stale
*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled
\*Remove-NetNeighbor -InterfaceAlias "Ethernet" -IPAddress fe80::aabb\:ccff\:fedd\:ee11 -Confirm:\$false
*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Disabled
*Set-NetIPInterface -InterfaceAlias "Ethernet" -Advertising Disabled # Nur relevant, wenn Windows als Router agiert


\=== Router Advertisements / SLAAC Schalter (Interface) ===
=== Tests & Troubleshooting ===
\*Get-NetIPInterface -AddressFamily IPv6 | Format-Table InterfaceAlias,RouterDiscovery,Advertising
*Test-Connection -TargetName ipv6.google.com -Count 4 # ICMPv6 Ping
\*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled
*Test-Connection -TargetName 2001:4860:4860::8888 -Count 4
\*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Disabled
*Test-NetConnection -ComputerName example.com -Port 443 -InformationLevel Detailed
\*Set-NetIPInterface -InterfaceAlias "Ethernet" -Advertising Disabled  # Nur relevant, wenn Windows als Router agiert
*Test-NetConnection -ComputerName example.com -TraceRoute
*Test-NetConnection -ComputerName example.com -CommonTCPPort HTTP
*Get-NetTCPConnection -AppliedSetting Internet -State Established
*ipconfig /all
*ipconfig /flushdns
*ping -6 example.com
*tracert -6 example.com
*pathping -6 example.com


\=== Tests & Troubleshooting ===
=== Windows Firewall (ICMPv6 & Ports) ===
\*Test-Connection -TargetName ipv6.google.com -Count 4  # ICMPv6 Ping
*Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" | Where-Object {$.Name -like "ICMP6"} | Format-Table Name,Enabled
\*Test-Connection -TargetName 2001:4860:4860::8888 -Count 4
*New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo In" -Protocol ICMPv6 -IcmpType 128 -Direction Inbound -Action Allow
\*Test-NetConnection -ComputerName example.com -Port 443 -InformationLevel Detailed
*New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo Out" -Protocol ICMPv6 -IcmpType 128 -Direction Outbound -Action Allow
\*Test-NetConnection -ComputerName example.com -TraceRoute
*New-NetFirewallRule -DisplayName "Allow TCP 8443 IPv6" -Direction Inbound -Protocol TCP -LocalPort 8443 -Action Allow -LocalAddress ::/0
\*Test-NetConnection -ComputerName example.com -CommonTCPPort HTTP
*Get-NetFirewallRule | Where-Object {$.DisplayName -like "IPv6"} | Format-Table DisplayName,Enabled
\*Get-NetTCPConnection -AppliedSetting Internet -State Established
\*ipconfig /all
\*ipconfig /flushdns
\*ping -6 example.com
\*tracert -6 example.com
\*pathping -6 example.com


\=== Windows Firewall (ICMPv6 & Ports) ===
=== Präfix-Richtlinien (Bevorzugung) ===
\*Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" | Where-Object {\$*.Name -like "*ICMP6*"} | Format-Table Name,Enabled
*netsh interface ipv6 show prefixpolicies
\*New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo In" -Protocol ICMPv6 -IcmpType 128 -Direction Inbound -Action Allow
*netsh interface ipv6 add prefixpolicy ::1/128 50 0
\*New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo Out" -Protocol ICMPv6 -IcmpType 128 -Direction Outbound -Action Allow
*netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 35 4 # IPv4-mapped Präferenz anpassen (nur falls nötig)
\*New-NetFirewallRule -DisplayName "Allow TCP 8443 IPv6" -Direction Inbound -Protocol TCP -LocalPort 8443 -Action Allow -LocalAddress ::/0
\*Get-NetFirewallRule | Where-Object {\$*.DisplayName -like "*IPv6*"} | Format-Table DisplayName,Enabled


\=== Präfix-Richtlinien (Bevorzugung) ===
=== Übergangstechniken deaktivieren (Legacy) ===
\*netsh interface ipv6 show prefixpolicies
*netsh interface teredo show state
\*netsh interface ipv6 add prefixpolicy ::1/128 50 0
*netsh interface teredo set state disabled
\*netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 35 4  # IPv4-mapped Präferenz anpassen (nur falls nötig)
*netsh interface 6to4 set state disabled
*netsh interface isatap set state disabled


\=== Übergangstechniken deaktivieren (Legacy) ===
=== Bevorzugung IPv4/IPv6 (Registry Toggle) ===
\*netsh interface teredo show state
*New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Force | Out-Null
\*netsh interface teredo set state disabled
*New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -PropertyType DWord -Value 0x00 -Force # IPv6 voll aktiv
\*netsh interface 6to4 set state disabled
*Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0x20 # IPv4 bevorzugt
\*netsh interface isatap set state disabled
*Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0xFF # IPv6 aus (nicht für Produktivbetrieb)
*Restart-Computer # Erforderlich nach Änderung


\=== Bevorzugung IPv4/IPv6 (Registry Toggle) ===
=== DHCPv6 / Autokonfiguration Hinweise ===
\*New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Force | Out-Null
*Get-NetIPInterface -AddressFamily IPv6 | Select-Object InterfaceAlias,AddressFamily,RouterDiscovery,Dhcp
\*New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -PropertyType DWord -Value 0x00 -Force  # IPv6 voll aktiv
*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled # SLAAC aktiv
\*Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0x20  # IPv4 bevorzugt
*Set-DnsClient -InterfaceAlias "Ethernet" -RegisterThisConnectionsAddress $true
\*Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0xFF  # IPv6 aus (nicht für Produktivbetrieb)
\*Restart-Computer  # Erforderlich nach Änderung


\=== DHCPv6 / Autokonfiguration Hinweise ===
=== Quick-Snippets (ersetzen: IF="Ethernet") ===
\*Get-NetIPInterface -AddressFamily IPv6 | Select-Object InterfaceAlias,AddressFamily,RouterDiscovery,Dhcp
*$if="Ethernet"; Get-NetIPAddress -InterfaceAlias $if -AddressFamily IPv6
\*Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled  # SLAAC aktiv
*$if="Ethernet"; New-NetIPAddress -InterfaceAlias $if -IPAddress 2001:db8:1::10 -PrefixLength 64 -DefaultGateway 2001:db8:1::1
\*Set-DnsClient -InterfaceAlias "Ethernet" -RegisterThisConnectionsAddress \$true
*$if="Ethernet"; Set-DnsClientServerAddress -InterfaceAlias $if -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
*$if="Ethernet"; New-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias $if -NextHop 2001:db8:1::1 -RouteMetric 20
*$if="Ethernet"; Test-NetConnection -ComputerName example.com -TraceRoute -InformationLevel Detailed


\=== Quick-Snippets (ersetzen: IF="Ethernet") ===
=== Nützliche Aufräumer ===
\*\$if="Ethernet"; Get-NetIPAddress -InterfaceAlias \$if -AddressFamily IPv6
Get-NetIPAddress -AddressFamily IPv6 | Where-Object {$_.IPAddress -like "2001:db8"} | Remove-NetIPAddress -Confirm:$false
\*\$if="Ethernet"; New-NetIPAddress -InterfaceAlias \$if -IPAddress 2001\:db8:1::10 -PrefixLength 64 -DefaultGateway 2001\:db8:1::1
Get-NetRoute -AddressFamily IPv6 | Where-Object {$_.DestinationPrefix -like "2001:db8:"} | Remove-NetRoute -Confirm:$false
\*\$if="Ethernet"; Set-DnsClientServerAddress -InterfaceAlias \$if -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
\*\$if="Ethernet"; New-NetRoute -DestinationPrefix 2001\:db8:2::/64 -InterfaceAlias \$if -NextHop 2001\:db8:1::1 -RouteMetric 20
\*\$if="Ethernet"; Test-NetConnection -ComputerName example.com -TraceRoute -InformationLevel Detailed


\=== Nützliche Aufräumer ===
=== Versionsinfo / Modul ===
*Get-NetIPAddress -AddressFamily IPv6 | Where-Object {$\_.IPAddress -like "2001\:db8*"} | Remove-NetIPAddress -Confirm:\$false
*$PSVersionTable
*Get-NetRoute -AddressFamily IPv6 | Where-Object {$\_.DestinationPrefix -like "2001\:db8:*"} | Remove-NetRoute -Confirm:\$false
*Get-Command -Module NetTCPIP | Where-Object Name -like "IPv6" | Sort-Object Name | Format-Table Name


\=== Versionsinfo / Modul ===
=== Hinweis (Admin-Konsole) ===
\*\$PSVersionTable
*Start-Process PowerShell -Verb RunAs # Konsole als Administrator öffnen
\*Get-Command -Module NetTCPIP | Where-Object Name -like "*IPv6*" | Sort-Object Name | Format-Table Name
=== Dhcp Abschalten ===
 
*Stop-Service Dhcp
\=== Hinweis (Admin-Konsole) ===
*Set-Service Dhcp -StartupType Disabled
\*Start-Process PowerShell -Verb RunAs # Konsole als Administrator öffnen

Aktuelle Version vom 23. Oktober 2025, 16:26 Uhr

Interfaces & Status

  • Get-NetIPInterface -AddressFamily IPv6
  • Get-NetIPInterface -AddressFamily IPv6 | Format-Table ifIndex,InterfaceAlias,ConnectionState,InterfaceMetric,RouterDiscovery
  • Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
  • Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
  • Get-NetIPConfiguration -Detailed

Adressen anzeigen & verwalten

  • Get-NetIPAddress -AddressFamily IPv6
  • Get-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6
  • New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:db8:1::10 -PrefixLength 64 -DefaultGateway 2001:db8:1::1
  • Remove-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:db8:1::10 -Confirm:$false
  • New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress fe80::10 -PrefixLength 64 -AddressFamily IPv6 -Type Unicast # Link-Local manuell
  • Set-NetIPv6Protocol -UseTemporaryAddresses Enabled # Privacy Extensions
  • Set-NetIPv6Protocol -UseTemporaryAddresses Disabled
  • Set-NetIPv6Protocol -RandomizeIdentifiers Enabled
  • Set-NetIPv6Protocol -RandomizeIdentifiers Disabled

DNS (AAAA/Resolver)

  • Resolve-DnsName example.com -Type AAAA
  • Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
  • Get-DnsClientServerAddress -AddressFamily IPv6
  • Clear-DnsClientCache

Routing

  • Get-NetRoute -AddressFamily IPv6
  • Get-NetRoute -AddressFamily IPv6 | Sort-Object RouteMetric | Format-Table DestinationPrefix,NextHop,InterfaceAlias,RouteMetric
  • New-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001:db8:1::1 -RouteMetric 20
  • Remove-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias "Ethernet" -NextHop 2001:db8:1::1 -Confirm:$false
  • Test-NetConnection -ComputerName 2001:db8:1::1 -DiagnoseRouting

Neighbor Discovery (NDP)

  • Get-NetNeighbor -AddressFamily IPv6
  • Get-NetNeighbor -InterfaceAlias "Ethernet" -State Stale
  • Remove-NetNeighbor -InterfaceAlias "Ethernet" -IPAddress fe80::aabb:ccff:fedd:ee11 -Confirm:$false

Router Advertisements / SLAAC Schalter (Interface)

  • Get-NetIPInterface -AddressFamily IPv6 | Format-Table InterfaceAlias,RouterDiscovery,Advertising
  • Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled
  • Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Disabled
  • Set-NetIPInterface -InterfaceAlias "Ethernet" -Advertising Disabled # Nur relevant, wenn Windows als Router agiert

Tests & Troubleshooting

  • Test-Connection -TargetName ipv6.google.com -Count 4 # ICMPv6 Ping
  • Test-Connection -TargetName 2001:4860:4860::8888 -Count 4
  • Test-NetConnection -ComputerName example.com -Port 443 -InformationLevel Detailed
  • Test-NetConnection -ComputerName example.com -TraceRoute
  • Test-NetConnection -ComputerName example.com -CommonTCPPort HTTP
  • Get-NetTCPConnection -AppliedSetting Internet -State Established
  • ipconfig /all
  • ipconfig /flushdns
  • ping -6 example.com
  • tracert -6 example.com
  • pathping -6 example.com

Windows Firewall (ICMPv6 & Ports)

  • Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" | Where-Object {$.Name -like "ICMP6"} | Format-Table Name,Enabled
  • New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo In" -Protocol ICMPv6 -IcmpType 128 -Direction Inbound -Action Allow
  • New-NetFirewallRule -DisplayName "Allow ICMPv6 Echo Out" -Protocol ICMPv6 -IcmpType 128 -Direction Outbound -Action Allow
  • New-NetFirewallRule -DisplayName "Allow TCP 8443 IPv6" -Direction Inbound -Protocol TCP -LocalPort 8443 -Action Allow -LocalAddress ::/0
  • Get-NetFirewallRule | Where-Object {$.DisplayName -like "IPv6"} | Format-Table DisplayName,Enabled

Präfix-Richtlinien (Bevorzugung)

  • netsh interface ipv6 show prefixpolicies
  • netsh interface ipv6 add prefixpolicy ::1/128 50 0
  • netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 35 4 # IPv4-mapped Präferenz anpassen (nur falls nötig)

Übergangstechniken deaktivieren (Legacy)

  • netsh interface teredo show state
  • netsh interface teredo set state disabled
  • netsh interface 6to4 set state disabled
  • netsh interface isatap set state disabled

Bevorzugung IPv4/IPv6 (Registry Toggle)

  • New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Force | Out-Null
  • New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -PropertyType DWord -Value 0x00 -Force # IPv6 voll aktiv
  • Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0x20 # IPv4 bevorzugt
  • Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 0xFF # IPv6 aus (nicht für Produktivbetrieb)
  • Restart-Computer # Erforderlich nach Änderung

DHCPv6 / Autokonfiguration Hinweise

  • Get-NetIPInterface -AddressFamily IPv6 | Select-Object InterfaceAlias,AddressFamily,RouterDiscovery,Dhcp
  • Set-NetIPInterface -InterfaceAlias "Ethernet" -RouterDiscovery Enabled # SLAAC aktiv
  • Set-DnsClient -InterfaceAlias "Ethernet" -RegisterThisConnectionsAddress $true

Quick-Snippets (ersetzen: IF="Ethernet")

  • $if="Ethernet"; Get-NetIPAddress -InterfaceAlias $if -AddressFamily IPv6
  • $if="Ethernet"; New-NetIPAddress -InterfaceAlias $if -IPAddress 2001:db8:1::10 -PrefixLength 64 -DefaultGateway 2001:db8:1::1
  • $if="Ethernet"; Set-DnsClientServerAddress -InterfaceAlias $if -ServerAddresses 2001:4860:4860::8888,2001:4860:4860::8844
  • $if="Ethernet"; New-NetRoute -DestinationPrefix 2001:db8:2::/64 -InterfaceAlias $if -NextHop 2001:db8:1::1 -RouteMetric 20
  • $if="Ethernet"; Test-NetConnection -ComputerName example.com -TraceRoute -InformationLevel Detailed

Nützliche Aufräumer

Get-NetIPAddress -AddressFamily IPv6 | Where-Object {$_.IPAddress -like "2001:db8"} | Remove-NetIPAddress -Confirm:$false Get-NetRoute -AddressFamily IPv6 | Where-Object {$_.DestinationPrefix -like "2001:db8:"} | Remove-NetRoute -Confirm:$false

Versionsinfo / Modul

  • $PSVersionTable
  • Get-Command -Module NetTCPIP | Where-Object Name -like "IPv6" | Sort-Object Name | Format-Table Name

Hinweis (Admin-Konsole)

  • Start-Process PowerShell -Verb RunAs # Konsole als Administrator öffnen

Dhcp Abschalten

  • Stop-Service Dhcp
  • Set-Service Dhcp -StartupType Disabled