Before you start
- Understanding services, the registry and permissions: see Windows 11 under the hood
In plain words
Windows comes with a DIY toolbox. But at the back of the garage there's a professional workbench: a powerful terminal, a package manager, a complete Linux, a disposable sandbox and a hypervisor. This guide opens up the workbench.
1. PowerShell 7 and Windows Terminal
Windows includes Windows PowerShell 5.1, frozen for years. PowerShell 7 is the modern, open source, cross-platform version (Windows, Linux, macOS). The two coexist: powershell.exe starts 5.1, pwsh.exe starts 7.
winget install Microsoft.PowerShell
Windows Terminal, installed by default on Windows 11, brings PowerShell, Command Prompt, WSL distributions and SSH connections together in tabs. In its settings, choose PowerShell 7 as the default profile and Windows Terminal as the default terminal application for Windows.
The commands to know:
Get-Command *service* # find a command
Get-Help Get-Service -Examples # help and examples
Get-Service wuauserv | Get-Member # an object's properties
Get-Process | Where-Object CPU -gt 100 # filter
Get-Process | Sort-Object WS -Descending |
Select-Object -First 5 # sort, keep 5
Get-Service | Export-Csv services.csv -NoTypeInformation
Get-History # history (Ctrl + R to search)
The key difference from a Linux shell: PowerShell handles objects, not text. You filter on properties (CPU, Status, Name) instead of cutting out columns.
The profile ($PROFILE) is a script run every time a session opens: aliases, functions, custom prompt.
if (-not (Test-Path $PROFILE)) { New-Item $PROFILE -Force }
notepad $PROFILE
2. winget: installing software and rebuilding a PC
winget is the Windows package manager: it installs, updates and uninstalls software from a public repository, without going through websites and their booby-trapped installers.
winget search vlc # search
winget install --id VideoLAN.VLC -e # install (exact ID)
winget upgrade # available updates
winget upgrade --all # update everything
winget uninstall --id VideoLAN.VLC -e # uninstall
Rebuilding a PC in one command: export the list of software from one PC, then import it on a new one.
winget export -o "$env:USERPROFILE\Desktop\software.json"
winget import -i software.json --accept-package-agreements
Keep this file with your backups: after a reinstall, all your software comes back in a few minutes. The winget configure command goes further by applying a complete configuration file (software, settings, Windows features).
The page Essential free software offers a selection to install this way.
3. WSL: Linux inside Windows
WSL (Windows Subsystem for Linux) runs real Linux distributions in a lightweight virtual machine integrated into Windows: same files, same network, start-up in a second. The project has been open source since 2025.
wsl --install # installs WSL and Ubuntu
wsl --list --online # available distributions
wsl --install -d Debian # install another distribution
wsl --list --verbose # installed distributions and their state
wsl --shutdown # stop all distributions
Files: from Linux, the Windows drives are under /mnt/c; from Windows, Linux files are reachable at \\wsl$\Debian in File Explorer. For performance, work on the files on the side where the tool runs: a project compiled under Linux should stay in the Linux file system.
Global settings go in %UserProfile%\.wslconfig:
[wsl2]
memory=8GB
processors=4
networkingMode=mirrored
Mirrored networking mode gives WSL the same addresses as Windows: a service started in Linux can be reached from the local network without port forwarding. Apply the changes with wsl --shutdown.
To get started with Linux, see Linux commands for beginners. Docker Desktop and Podman Desktop also rely on WSL (see Installing Docker).
4. Windows Sandbox: testing without risk
Windows Sandbox starts a clean, disposable Windows in a window. Everything that happens inside disappears when it closes: ideal for testing dubious software or opening a suspicious attachment. Available on the Pro, Enterprise and Education editions.
Enable-WindowsOptionalFeature -Online `
-FeatureName Containers-DisposableClientVM -All
A configuration file (.wsb) customises the sandbox. Example: no network, with a host folder mounted read-only.
<Configuration>
<Networking>Disable</Networking>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Users\spo\Downloads\To-test</HostFolder>
<SandboxFolder>C:\To-test</SandboxFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
</Configuration>
Save it as analysis.wsb and double-click it. Cutting the network stops malware from contacting its server or spreading.
5. Hyper-V
Hyper-V is the hypervisor built into the Pro, Enterprise and Education editions. It suits a test lab: a domain controller, a Linux server, a Windows version to validate.
Enable-WindowsOptionalFeature -Online `
-FeatureName Microsoft-Hyper-V -All
After a restart, Hyper-V Manager lets you create virtual machines, or in PowerShell:
New-VMSwitch -Name "External" -NetAdapterName "Ethernet" `
-AllowManagementOS $true
New-VM -Name "Debian-test" -Generation 2 -MemoryStartupBytes 4GB `
-NewVHDPath "D:\VM\Debian-test.vhdx" -NewVHDSizeBytes 40GB `
-SwitchName "External"
Set-VMFirmware -VMName "Debian-test" `
-SecureBootTemplate MicrosoftUEFICertificateAuthority
Add-VMDvdDrive -VMName "Debian-test" -Path "D:\ISO\debian.iso"
Start-VM -Name "Debian-test"
The MicrosoftUEFICertificateAuthority Secure Boot template is needed to boot a Linux distribution in generation 2. To choose between Hyper-V, Proxmox, VMware and the others, see Choosing a hypervisor.
6. The essential Sysinternals tools
winget install Microsoft.Sysinternals.Suite
| Tool | Use |
|---|---|
| Process Explorer | A complete Task Manager: process tree, DLLs, handles, VirusTotal check |
| Autoruns | Everything that starts automatically, to sort through and disable |
| Process Monitor | Every file, registry and network access, live: find out why an application fails ("ACCESS DENIED", "NAME NOT FOUND") |
| TCPView | Network connections per process, live |
| Sigcheck | Check file signatures and reputation: sigcheck -u -e C:\Windows\System32 |
| PsExec | Run a command on another PC or as SYSTEM: psexec -s -i cmd |
| BgInfo | Show the name, IP address and version on the desktop background (handy across a fleet) |
Process Monitor is the most effective last-resort tool: filter on the process name and the "ACCESS DENIED" result to see exactly which file or registry key is blocking an application.
7. Remote access: RDP, OpenSSH and PowerShell remoting
Remote Desktop (RDP) is available as a server on the Pro editions and above (Settings › System › Remote Desktop). To secure it:
- keep Network Level Authentication (NLA) turned on;
- never expose port 3389 to the internet: go through a VPN (WireGuard, for example);
- restrict access with the firewall to an administration network (see Windows 11 security);
- allow only the accounts that need it (the "Remote Desktop Users" group).
OpenSSH is built into Windows. The client is installed by default; the server is added with one command, and lets you administer the PC from the command line like a Linux server:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Set-Service sshd -StartupType Automatic
Start-Service sshd
Administrators' public keys go in C:\ProgramData\ssh\administrators_authorized_keys. Apply the same principles as in Securing SSH access to a Linux server: keys rather than passwords, access restricted by the firewall.
PowerShell remoting (WinRM) administers one or more domain PCs:
Enable-PSRemoting -Force # on the PC to administer
Enter-PSSession -ComputerName PC-ACCOUNTS # interactive session
Invoke-Command -ComputerName PC1, PC2 -ScriptBlock {
Get-Service wuauserv
} # command on several PCs
The full comparison of access methods is in Remote access: RDP, VNC, SSH.
8. Automating with scheduled tasks
A PowerShell script becomes an automatic task in a few lines. Example: update all software every Sunday at noon, with the highest privileges:
$action = New-ScheduledTaskAction -Execute 'winget.exe' `
-Argument 'upgrade --all --silent --accept-package-agreements'
$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 12:00
Register-ScheduledTask -TaskName 'winget updates' `
-Action $action -Trigger $trigger -RunLevel Highest
Check the last run with Get-ScheduledTaskInfo -TaskName 'winget updates'.
9. Summary
| Tool | Editions | Installation |
|---|---|---|
| PowerShell 7 | All | winget install Microsoft.PowerShell |
| Windows Terminal | All | Included in Windows 11 |
| winget | All | Included (App Installer) |
| WSL | All | wsl --install |
| Windows Sandbox | Pro and above | Optional feature |
| Hyper-V | Pro and above | Optional feature |
| Sysinternals | All | winget install Microsoft.Sysinternals.Suite |
| RDP server | Pro and above | Settings › System › Remote Desktop |
| OpenSSH server | All | Optional feature |