Blog Posts
Everything published on this blog since 2017, newest first. The SQL Server writing now lives at sqldba.blog.
Guides: Claude Code · PowerShell · WSL · Windows
-
How to Back Up and Restore a WSL Distro
A WSL distribution is one command away from being a single tar file you can copy, archive, or restore onto another machine.
-
How to Rename Multiple Files at Once with PowerShell
Renaming a hundred files by hand is nobody’s afternoon. Rename-Item with a script block does it in one line, and -WhatIf shows you the result before it happens.
-
How to Limit WSL 2 Memory and CPU Usage
WSL 2 will happily take a large share of your RAM and not give it back quickly. A .wslconfig file in your user folder puts a ceiling on it.
-
How to Search for Text Inside Files with PowerShell
Select-String is the PowerShell answer to grep. It searches inside files, reports the line number, and works recursively across a whole folder tree.
-
How to Change the Default User in WSL
WSL logs you in as whichever account you created first. One command changes that, and it no longer needs you to edit a config file inside the distro.
-
How to Get a Folder Size in PowerShell
Windows Explorer will tell you a folder size eventually. PowerShell tells you in one line, and can do it for every folder on the drive at once.
-
How to Format Dates with Get-Date in PowerShell
Every script that writes a log or names a file needs a date in a specific shape. These are the Get-Date format strings worth committing to memory.
-
How to Get System Information with PowerShell
One block of PowerShell answers the questions you get asked about a server: what it runs, how much memory it has, how long it has been up, and how full the disks are.
-
How to Copy Files and Folders with PowerShell
Copy-Item handles most copying jobs in one line. For very large trees, or anything that needs to resume, robocopy is still the better tool and PowerShell drives it happily.