The rebuild.ps1 script automates reinstalling standard applications and applying system tweaks after a fresh Windows install.
-
Clone or download this repository.
-
Open PowerShell (the script self-elevates if not already admin) and run:
.\rebuild.ps1
A timestamped transcript (rebuild-YYYYMMDD-HHMMSS.log) is written next to the script.
App selection lives in applications.json. Each entry has:
Id— winget package ID (or Microsoft Store product ID)Name— display name used in log outputExcludeOn— array of any ofDesktop,Laptop,ARM64,x64to skip the app on those targets
Add, remove, or re-tag apps there; no script edits required.
- Self-elevates to Administrator
- Detects architecture (
x64/ARM64) and form factor (Desktop/Laptop) - Sets the power plan: Ultimate Performance on desktops (auto-imported via
powercfg -duplicatescheme), Balanced on laptops - Installs every app from
applications.jsonnot excluded for the current target, skipping anything already installed - Sets
UserDuckingPreferenceto "do nothing" for communication audio - Force-installs the BypassPaywall extension in Edge via policy
- Sets the Windows App (Windows 365) environment to SelfHost
- Sets High Performance GPU preference for
plex.exe(only if found) - Disables system-wide CPU power throttling
- Invokes credentialfix.ps1 if present, which installs a scheduled task that resets
CredentialUIBroker.exeevery 6 hours (WebAuthn/FIDO2 workaround)
- Requires
winget(ships with modern Windows 11). - A reboot is recommended after the run.
- Failed installs are reported with the winget exit code; the script continues.
Contributions welcome.