Notes on Windows 11

Notes on Windows 11

This article is a living collection of tweaks I apply to my Windows 11 installations, both personal and company-managed. It covers the settings I change, the tools I install, and the WSL and container setup I use to make a fresh Windows installation work the way I want.

Windows tweaks

Windows 11 comes with plenty of defaults I don't want or need. Let's fix the regional settings, Explorer, taskbar, power options and wallpaper.

Change culture to improve date and time formatting

This changes regional formats such as dates, times, numbers and decimal separators for your Windows user account. It does not change the Windows display language.

Set-Culture -CultureInfo nl-NL
Stop-Process -Name explorer -Force

Tweak the desktop, Explorer, Search and the taskbar

Let's change multiple settings at once:

  1. Hide the desktop icons. I only want to see my wallpaper.
  2. Remove Bing from the Start menu search -- I don't need web search.
  3. Restore the classic context menu.
  4. Show file extensions in File Explorer.
  5. Disable the Windows 11 taskbar widgets, as I don't use them.
  6. Use a dark taskbar.

Here is the code:

& {
  $basePath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion'
  $steps = 6

  # 1) Desktop icons (set $value = 1 to hide)
  Write-Host "[1/$steps] Setting desktop icon visibility..." -ForegroundColor Cyan
  $value = 1
  Set-ItemProperty -Path "$basePath\\Explorer\\Advanced" -Name HideIcons -Type DWord -Value $value

  # 2) Remove Bing from Start menu search (set $value = 1 to enable)
  Write-Host "[2/$steps] Disabling Bing in Start menu search..." -ForegroundColor Cyan
  $value = 0
  Set-ItemProperty -Path "$basePath\\Search" -Name BingSearchEnabled -Type DWord -Value $value

  # 3) Classic context menu (Windows 10 style)
  Write-Host "[3/$steps] Restoring Windows 10-style context menu..." -ForegroundColor Cyan
  $clsidPath = 'HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32'
  if (-not (Test-Path $clsidPath)) {
    New-Item -Path $clsidPath -Force | Out-Null
  }
  Set-ItemProperty -Path $clsidPath -Name '(Default)' -Value ''

  # 4) File extensions in Explorer (set $value = 1 to hide)
  Write-Host "[4/$steps] Showing file extensions in Explorer..." -ForegroundColor Cyan
  $value = 0
  Set-ItemProperty -Path "$basePath\\Explorer\\Advanced" -Name HideFileExt -Type DWord -Value $value

  # 5) Disable Windows 11 taskbar widgets
  Write-Host "[5/$steps] Removing Windows 11 taskbar widgets..." -ForegroundColor Cyan
  Get-AppxPackage *WebExperience* | Remove-AppxPackage

  # 6) Dark taskbar (custom color & disable transparency)
  Write-Host "[6/$steps] Setting dark taskbar and disabling transparency..." -ForegroundColor Cyan
  $personalizePath = "$basePath\\Themes\\Personalize"
  Set-ItemProperty -Path $personalizePath -Name "AppsUseLightTheme" -Value 1 -Type DWord
  Set-ItemProperty -Path $personalizePath -Name "SystemUsesLightTheme" -Value 0 -Type DWord
  Set-ItemProperty -Path $personalizePath -Name "EnableTransparency" -Value 0 -Type DWord

  # Restart Explorer once to apply all changes
  Write-Host "Restarting Windows Explorer to apply changes..." -ForegroundColor Green
  Stop-Process -Name explorer -Force
  Write-Host "All tweaks applied." -ForegroundColor Green
}

Hibernation

I want to enable hibernation. When I press my laptop's power button, I want it to hibernate, and I want the Hibernate option to appear in the Start menu's power menu.

& {

  if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
    ).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
    Write-Host "Please run PowerShell as Administrator."
    break
  }

  # Enable hibernation
  powercfg /hibernate on

  # Start menu button -> Hibernate
  powercfg /setacvalueindex scheme_current SUB_BUTTONS UIBUTTON_ACTION 1
  powercfg /setdcvalueindex scheme_current SUB_BUTTONS UIBUTTON_ACTION 1

  # Physical power button -> Hibernate
  powercfg /setacvalueindex scheme_current SUB_BUTTONS PBUTTONACTION 2
  powercfg /setdcvalueindex scheme_current SUB_BUTTONS PBUTTONACTION 2

  # Apply scheme
  powercfg /setactive scheme_current

  # Ensure Hibernate is visible in Start menu
  reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" `
    /v ShowHibernateOption /t REG_DWORD /d 1 /f | Out-Null

  # Restart Explorer to refresh UI
  Stop-Process -Name explorer -Force -ErrorAction SilentlyContinue
  Start-Process explorer.exe

  # Output resulting configuration
  powercfg /a
  powercfg /query scheme_current SUB_BUTTONS
}

Better wallpaper

Dynamic Theme by Christophe Lavalle gives you access to images from Bing and Windows Spotlight. Install it directly from the Microsoft Store using WinGet:

winget install --id 9NBLGGH1ZBKW --exact --source msstore

Software and command-line tools

A fresh Windows installation needs a few additional tools before it feels ready for development. Let's install PowerShell 7 and some familiar Unix command-line utilities.

PowerShell 7

I'm using Chocolatey as my installer of choice. If you don't have it installed yet, run:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Now let's use it to install PowerShell 7.

choco install powershell-core -y

Now that PowerShell 7 is installed, you'll need to set it as the default profile in Windows Terminal:

Windows Terminal menu with the Settings option highlighted
Open Windows Terminal settings.
Windows Terminal Startup settings with PowerShell 7 selected as the default profile
Select PowerShell 7 as the default profile.

Unix utilities

AI assistants often suggest Unix tools such as grep, find and tail, even when you're working on Windows. Microsoft now provides native Windows versions of these utilities, so there's no need to translate every command to its PowerShell equivalent. Install them with WinGet:

winget install Microsoft.Coreutils

The Microsoft documentation lists all available commands.

Containers with WSL and Rancher Desktop

Rancher Desktop is a free and open-source container management application, with its source code available on GitHub under the Apache 2.0 license. On Windows, it runs on WSL 2 and can provide the Docker API, Docker CLI and Docker Compose through Moby. It does not require the full Hyper-V role, although WSL 2 still uses a managed virtual machine and requires hardware virtualization.

Install WSL 2

Start PowerShell as Administrator and run:

wsl --install

Restart Windows after the installation. The command also installs Ubuntu, which is useful if you want to use WSL directly.

Install Rancher Desktop

Install Rancher Desktop with Chocolatey:

choco install rancher-desktop -y

Start Rancher Desktop and select dockerd (Moby) under Preferences > Container Engine. Rancher Desktop automatically adds Docker, Docker Compose and its other command-line tools to PATH.

Verify the installation with:

wsl --status
docker version
docker run --rm hello-world

If you only need containers, you can disable Kubernetes in Rancher Desktop.

Further reading

While working on this blog, I found the following articles, which might be useful:

Changelog