Skip to content

Add standalone Windows PowerShell reboot script#1

Open
arithmetic-zz wants to merge 1 commit into
mainfrom
feature/windows-reboot-script
Open

Add standalone Windows PowerShell reboot script#1
arithmetic-zz wants to merge 1 commit into
mainfrom
feature/windows-reboot-script

Conversation

@arithmetic-zz

Copy link
Copy Markdown
Owner

What

Adds a ready-to-run Windows reboot path, mirroring the existing generated reboot_fritzbox.sh curl script.

  • reboot_fritzbox.ps1 — sends the same TR-064 DeviceConfig1:Reboot SOAP command using HTTP Digest auth (System.Net.CredentialCache). No Python, no extra modules — runs with the PowerShell shipped in Windows 10/11. Host/port/user/password are placeholders at the top of the file. Includes a yes/y confirmation prompt and [OK]/[ERROR] output (handles 401 auth failure and unreachable host), matching the style of the bash/Python scripts.
  • reboot_fritzbox.cmd — double-click launcher that runs the .ps1 with -ExecutionPolicy Bypass.
  • README — new "Windows (PowerShell, no Python needed)" section.

Sets ServicePointManager::Expect100Continue = $false so behaviour matches curl for this small body.

Prerequisite (same as the API method): TR-064 must be enabled on the FritzBox — Heimnetz > Netzwerk > Netzwerkeinstellungen > "Zugriff für Anwendungen zulassen".

Testing

⚠️ Not yet tested on Windows. Could not run against a real FritzBox from the dev machine (macOS, no PowerShell available for a syntax check either). The Digest/SOAP approach is the established way for TR-064 on Windows, but please verify on a Windows PC against a real box before merging:

  1. Fill in the placeholders in reboot_fritzbox.ps1.
  2. Double-click reboot_fritzbox.cmd (or run powershell -NoProfile -ExecutionPolicy Bypass -File .\reboot_fritzbox.ps1).
  3. Confirm the reboot is triggered and the router restarts.

Note

reboot_fritzbox.ps1 ships with placeholder credentials and is tracked in git. Once you fill in a real password it holds it in plain text — don't commit that change (noted in the README and the script header).

🤖 Generated with Claude Code

Adds reboot_fritzbox.ps1, a Windows equivalent of the generated
reboot_fritzbox.sh curl script. Sends the same TR-064 DeviceConfig1:Reboot
SOAP command using HTTP Digest auth via System.Net.CredentialCache - no
Python or extra modules required. Credentials are placeholders to fill in.

Also adds reboot_fritzbox.cmd, a double-click launcher that runs the script
with -ExecutionPolicy Bypass, and documents both in the README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant