Consumer Windows is tuned for a casual user — it sleeps mid-task, phones home with telemetry, and ships gaming services a developer never touches. If you run long automation, scraping pipelines, or Playwright jobs, a few settings changes make the machine stable and quiet. Here’s a single PowerShell script that applies them — and the safety steps to run it sanely.
The point isn’t to strip Windows bare; it’s to stop the machine from interrupting long-running work and to surface the things developers actually need. It pairs with running a laptop as an always-on server — same instinct, applied to the whole workstation.
Sleeps + powers down disk mid-task. Telemetry + ad-ID on. Xbox services running. Long paths off; extensions + hidden files hidden.
No sleep/disk-off/hibernate — long jobs run through. Telemetry off, Xbox off. Long paths ON for Python; extensions + hidden files shown.
Table of Contents
What the script changes
Five groups of settings, each aimed at a specific developer pain:
- Power — via
powercfg, activates a high-performance plan and disables sleep, disk timeout, hibernation, and USB selective suspend, so a long scrape or build never gets suspended mid-run. - Privacy/telemetry — turns off the advertising ID, activity history, tailored experiences, location tracking, and feedback prompts, cutting background chatter and interruptions.
- Developer ergonomics — enables long path support (Python and Node dependency trees routinely blow past the old 260-char limit), and shows file extensions and hidden files (so
.env,.git,.vscodeare visible). - Network stability — stops the network adapter from powering down, which otherwise drops long-lived connections during scraping or API polling.
- Cleanup — disables the Xbox services a dev box never uses, trimming startup and background load.
The script
Save this as dev-workstation-setup.ps1:
Write-Host "Applying development workstation configuration..."
# --- POWER ---
powercfg -setactive SCHEME_MIN
powercfg /change standby-timeout-ac 0
powercfg /change standby-timeout-dc 0
powercfg /change monitor-timeout-ac 20
powercfg -change -disk-timeout-ac 0
powercfg -h off
powercfg -setacvalueindex scheme_current sub_usb usbselectivesuspend 0
powercfg -setactive scheme_current
# --- PRIVACY / TELEMETRY ---
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v PublishUserActivities /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Privacy" /v TailoredExperiencesWithDiagnosticDataEnabled /t REG_DWORD /d 0 /f
# --- DEVELOPER SETTINGS ---
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
# --- NETWORK STABILITY ---
powercfg -setacvalueindex scheme_current sub_none netpowerdown 0
powercfg -setactive scheme_current
# --- CLEANUP: disable Xbox services ---
foreach ($svc in "XblAuthManager","XblGameSave","XboxNetApiSvc") {
Stop-Service $svc -ErrorAction SilentlyContinue
Set-Service $svc -StartupType Disabled
}
Write-Host "Done. Restart for best results."
Code language: PowerShell (powershell)
How to run it safely
The safety steps aren’t optional — this changes system settings:
- Create a restore point first: System Protection → Create Restore Point. This is your one-click undo.
- Open PowerShell as Administrator (Start → PowerShell → Run as Administrator).
- Allow the script for this session:
Set-ExecutionPolicy RemoteSigned. - Run it:
.\dev-workstation-setup.ps1, then restart.
Create the restore point before you run anything — it’s the one-click undo for every change here.
Where NOT to run it
This is for a personal development machine. Don’t run it on:
- Corporate / managed machines — it may violate IT policy and fight group policy.
- Shared computers — it changes privacy and service settings for everyone.
- Gaming PCs — it disables Xbox services.
- Battery-dependent laptops — disabling sleep will drain the battery; keep this for mains-powered or always-on machines (the laptop-as-a-server case).
Great on your own plugged-in dev box; wrong on a corporate laptop or a machine you share — know which you have.
The short version
This PowerShell script turns consumer Windows into a stable dev/automation workstation: it disables sleep, disk-off and hibernation so long jobs run uninterrupted; turns off advertising ID, activity history and tailored experiences; enables long paths for Python and shows file extensions and hidden files; stops the network adapter powering down; and disables Xbox services. Create a restore point, run it as Administrator with Set-ExecutionPolicy RemoteSigned, then restart — and only on a personal, plugged-in machine, never a corporate, shared, or battery-dependent one.
Frequently Asked Questions
Is this script safe for Windows 10?
Yes — it uses standard Windows commands (powercfg, reg add, service configuration) and changes settings only; it deletes no files. Still, create a System Restore point before running it so every change is one-click reversible.
Does it work on Windows 11?
Mostly. The power, privacy and developer settings apply the same way; a few registry paths differ slightly between versions, so review the output and confirm the developer settings (long paths, show extensions) took effect.
Will it affect gaming?
Yes — it disables the Xbox authentication, game-save and networking services. If you game on the same machine, skip the cleanup section or re-enable those services (Set-Service <name> -StartupType Automatic).
Why enable long paths?
Python, Node and similar toolchains create deeply nested dependency folders that exceed Windows’ legacy 260-character path limit, causing “path too long” errors. LongPathsEnabled = 1 removes that limit for modern apps — one of the highest-value developer settings here.
Can these changes be reversed?
Yes. Roll back with the restore point you created, or reverse individually — re-enable sleep in power settings, flip the registry values back, and set the Xbox services to Automatic. Nothing here is destructive or permanent.