Documentation Index
Fetch the complete documentation index at: https://mintlify.com/flick9000/winscript/llms.txt
Use this file to discover all available pages before exploring further.
Windows power plans control how the operating system manages CPU frequency, sleep states, and device power consumption. Choosing the right plan can have a meaningful impact on responsiveness, frame rates, and overall system throughput — especially on desktops where battery life is not a concern.
Power Plans
WinScript can activate one of three built-in Windows power schemes. Each plan is identified by a fixed GUID and is enabled via powercfg.
Balanced
The default Windows power plan. It scales CPU performance up and down dynamically based on demand, conserving energy while still delivering acceptable performance.
$balanced = powercfg -list | Select-String -Pattern 'Balanced'
if ($balanced) {
Write-Host '-- Power plan already exists.'
} else {
Write-Host '-- Enabling Balanced.'
$output = powercfg -duplicatescheme 381b4222-f694-41f0-9685-ff5bb260df2e 2>&1
if ($output -match 'Unable to create a new power scheme' -or $output -match 'The power scheme, subgroup or setting specified does not exist') {
powercfg -RestoreDefaultSchemes
}
}
$balancedGUID = (powercfg -list | Select-String -Pattern 'Balanced').Line.Split()[3]
Write-Host '-- Activating Balanced'
powercfg -setactive $balancedGUID
Keeps the CPU running at or near maximum frequency at all times, eliminating the ramp-up delay of Balanced. This results in lower and more consistent latency for CPU-bound workloads.
$highPerformance = powercfg -list | Select-String -Pattern 'High performance'
if ($highPerformance) {
Write-Host '-- Power plan already exists.'
} else {
Write-Host '-- Enabling High Performance.'
$output = powercfg -duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2>&1
if ($output -match 'Unable to create a new power scheme' -or $output -match 'The power scheme, subgroup or setting specified does not exist') {
powercfg -RestoreDefaultSchemes
}
}
$highPlanGUID = (powercfg -list | Select-String -Pattern 'High performance').Line.Split()[3]
Write-Host '-- Activating High Performance'
powercfg -setactive $highPlanGUID
An extension of High Performance that removes remaining micro-latency caused by power management techniques such as processor idle state management and timer coalescing. It is hidden by default on Home and some Pro editions of Windows.
$ultimatePerformance = powercfg -list | Select-String -Pattern 'Ultimate Performance'
if ($ultimatePerformance) {
Write-Host '-- Power plan already exists.'
} else {
Write-Host '-- Enabling Ultimate Performance.'
$output = powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 2>&1
if ($output -match 'Unable to create a new power scheme' -or $output -match 'The power scheme, subgroup or setting specified does not exist') {
powercfg -RestoreDefaultSchemes
}
}
$ultimatePlanGUID = (powercfg -list | Select-String -Pattern 'Ultimate Performance').Line.Split()[3]
Write-Host '-- Activating Ultimate Performance'
powercfg -setactive $ultimatePlanGUID
Ultimate Performance is the recommended choice for desktop PCs where power draw and heat are not a concern. If you are on a laptop, stick with Balanced — the higher idle power draw will noticeably reduce battery life without a proportional performance gain during everyday tasks.
DNS Configuration
By default, Windows uses the DNS servers provided by your router or ISP, which may have high latency or poor uptime. Switching to a well-maintained public DNS resolver can reduce name resolution time and improve browsing speed.
The commands below target the Ethernet adapter. Adjust the interface name (e.g., Wi-Fi) to match your active connection if needed.
Google DNS
Cloudflare DNS
OpenDNS
Quad9
AdGuard DNS
Fast and reliable general-purpose DNS by Google. Primary: 8.8.8.8, secondary: 8.8.4.4.netsh interface ip set dns name="Ethernet" static 8.8.8.8
netsh interface ip add dns name="Ethernet" 8.8.4.4 index=2
Privacy-focused DNS by Cloudflare with consistently low global latency. Primary: 1.1.1.1, secondary: 1.0.0.1.netsh interface ip set dns name="Ethernet" static 1.1.1.1
netsh interface ip add dns name="Ethernet" 1.0.0.1 index=2
DNS service by Cisco with optional content filtering and phishing protection. Primary: 208.67.222.222, secondary: 208.67.220.220.netsh interface ip set dns name="Ethernet" static 208.67.222.222
netsh interface ip add dns name="Ethernet" 208.67.220.220 index=2
Security-focused DNS that blocks known malicious domains at the resolver level. Primary: 9.9.9.9, secondary: 149.112.112.112.netsh interface ip set dns name="Ethernet" static 9.9.9.9
netsh interface ip add dns name="Ethernet" 149.112.112.112 index=2
DNS resolver that filters ads and trackers network-wide without requiring any client software. Primary: 94.140.14.14, secondary: 94.140.15.15.netsh interface ip set dns name="Ethernet" static 94.140.14.14 | Out-Null
netsh interface ip add dns name="Ethernet" 94.140.15.15 index=2 | Out-Null