Skip to content

Instantly share code, notes, and snippets.

@alexander-danilenko
Last active July 13, 2025 19:16
Show Gist options
  • Save alexander-danilenko/a56cf4663b4c957fd8992c8dcb8ab363 to your computer and use it in GitHub Desktop.
Save alexander-danilenko/a56cf4663b4c957fd8992c8dcb8ab363 to your computer and use it in GitHub Desktop.
Windows 11 Cheatsheet

A comprehensive guide for configuring and optimizing Windows 11 for development, productivity, and security.

System Configuration

Windows Activation

Caution

Always review activation scripts before running them. Never execute scripts blindly from the internet.

Tip

Consider purchasing OEM license keys online for legitimate activation at reduced prices.

Use the massgrave repository for reliable and secure Windows activation:

Power Management

Disable Hibernation

Free up disk space and improve system performance:

powercfg.exe /hibernate off

Manage Sleep Mode Wake-ups

List devices that can wake the system:

powercfg -devicequery wake_armed

Disable wake for specific device:

powercfg /devicedisablewake "Device Name"

Time Settings

Configure time synchronization for dual-boot setups:

Enable universal time:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1

Disable universal time:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 0

Development Environment

Visual Studio Code

Installation

winget install --id XP9KHM4BK9FZ7Q --accept-source-agreements

Configuration

Import settings from dotfiles:

Invoke-WebRequest https://raw.githubusercontent.com/alexander-danilenko/dotfiles/main/.config/Code/User/settings.json -OutFile "${env:APPDATA}\Code\User\settings.json"

Essential Extensions

ForEach ($extension in @(
    "acarreiro.calculate"        # Inline calculator
    "editorconfig.editorconfig"  # Coding style consistency
    "mikestead.dotenv"          # Environment variables
    "ms-python.python"          # Python support
    "tyriar.lorem-ipsum"        # Lorem Ipsum generator
    "yzhang.markdown-all-in-one" # Markdown tools
)) { code --install-extension $extension --force }

GitHub Copilot

Installation

# Install GitHub CLI
winget install --id GitHub.cli

# Authenticate
gh auth login

# Install Copilot extension
gh extension install github/gh-copilot

Usage Example

gh copilot suggest How to disable hibernation using powershell?

### Node.js Setup

Installation

winget install --id OpenJS.NodeJS.LTS

Global Packages

npm install --global tldr

Important

Restart terminal after Node.js installation before installing npm packages.

Windows Subsystem for Linux

Installation

wsl --install --distribution Debian
wsl --set-default-version 2

Important

Reboot after WSL installation for proper kernel integration.

Management Commands

# List available distros
wsl --list --online

# Install specific distros
wsl --install --distribution Debian
wsl --install --distribution Ubuntu-24.04

# List installed versions
wsl --list --verbose

# Get distro IP
wsl --distribution Debian --exec ip route list default

File System Access

  • WSL → Windows: Access via \\wsl$\<distro-name>
  • Windows → WSL: Access via /mnt/c/, /mnt/d/, etc.

Note

WSL filesystem is case-sensitive. Windows drives in WSL have 777 permissions by default.

## Package Management

WinGet Usage

Important

Install App Installer from Microsoft Store first.

Basic Commands

# Search packages
winget search <appName>

# List installed apps
winget list

# Update all apps
winget upgrade --all

Common Applications

ForEach ($item in @(
  # AI
  "9NT1R1C2HH7J"     # ChatGPT
  "Anthropic.Claude" # Claude.ai

  # Development
  "Anysphere.Cursor"  # Cursor AI
  "Git.Git"           # Git
  "JetBrains.Toolbox" # JetBrains IDEs
  "OpenJS.NodeJS.LTS" # Node.js
  "Python.Python.3"   # Python
  "XP9KHM4BK9FZ7Q"    # VS Code

  # Internet
  "XP99C9G0KRDZ27"   # 1Password
  "XP8C9QZMS2PC1T"   # Brave
  "XPDC2RH70K22MN"   # Discord
  "Google.Chrome"     # Chrome
  "9NZVDKPMR9RD"     # Firefox
  "Notion.Notion"     # Notion
  "9WZDNCRDK3WP"     # Slack
  "9NZTWSQNTD0S"     # Telegram

  # Media
  "CodecGuide.K-LiteCodecPack.Mega" # Codecs
  "HandBrake.HandBrake"             # Video
  "9NMZLZ57R3T7"                    # HEVC
  "9MVZQVXJBQ9V"                    # AV1
  "XPDM1ZW6815MQM"                  # VLC

  # System
  "CrystalDewWorld.CrystalDiskInfo" # Disk info
  "CrystalDewWorld.CrystalDiskMark" # Disk benchmark
  "REALiX.HWiNFO"                   # System info
  "9PC3H3V7Q9CH"                    # Rufus
  "Synology.DriveClient"            # Synology Drive

  # Utilities
  "7zip.7zip"                      # 7-Zip
  "9PM860492SZD"                   # PC Manager
  "XP89572Q9J4225"                 # Wise Uninstaller
)) { winget install --id $item --accept-source-agreements }

Network Configuration

Network Credentials

$SmbAddresses = @("192.168.50.123", "NetworkStorage")
$cred = Get-Credential -Message "Enter credentials for NAS SMB access"
foreach ($address in $SmbAddresses) {
    $cmdkeyTarget = $address -replace "^\\\\+", ""
    cmdkey.exe /delete:$cmdkeyTarget | Out-Null
    cmdkey.exe /add:$cmdkeyTarget /user:$($cred.UserName) /pass:$($cred.GetNetworkCredential().Password)
}

Hosts File Management

code %SystemRoot%\System32\drivers\etc\hosts

Privacy & Security

O&O ShutUp10++

Download O&O ShutUp10++ to manage Windows privacy settings.

Warning

Create a system restore point before applying changes.

PowerShell Security

# Allow local scripts
Set-ExecutionPolicy RemoteSigned

# Update help files
Update-Help -ErrorAction Ignore

Troubleshooting

Firefox Video Freeze

  1. Open about:config
  2. Set widget.windows.window_occlusion_tracking.enabled to false

Common Commands

Action Command
Disable password prompt netplwiz
Reset network stack ipconfig /flushdns; netsh winsock reset

Environment Variables

Variable Volatile Default Value (C: drive)
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users{username}\AppData\Roaming
LOCALAPPDATA C:\Users{username}\AppData\Local
PATH User/System C:\Windows\System32;C:\Windows;...
ProgramFiles C:\Program Files
ProgramFiles(x86) C:\Program Files (x86)
SYSTEMROOT C:\Windows
TEMP/TMP User C:\Users{Username}\AppData\Local\Temp
USERPROFILE C:\Users{username}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment