Skip to content

Instantly share code, notes, and snippets.

@CarstenG2
CarstenG2 / gist:162ca553f9b5096499a1cc34fb88397b
Last active January 6, 2024 15:20
Powershell-Code to force a reconnect on an AVM Fritz.Box
# reset Internet-Connection on fritz.box to get new IP:
cls
Add-Type -AssemblyName System.Net.Http
$handler = [System.Net.Http.HttpClientHandler]::new()
$ignoreCerts = [System.Net.Http.HttpClientHandler]::DangerousAcceptAnyServerCertificateValidator
$handler.ServerCertificateCustomValidationCallback = $ignoreCerts
$client = [System.Net.Http.HttpClient]::new($handler)
$url = 'http://fritz.box:49000/igd2upnp/control/WANIPConn1'
$body = @"