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
-
List Installed Windows Updates with Get-HotFix
List installed Windows updates with Get-HotFix, newest first, check whether one KB is installed, filter by date, and why Get-HotFix shows fewer updates than Update history.
-
Write-Host vs Write-Output in PowerShell
Write-Host prints to the screen and cannot be captured in a variable or pipeline; Write-Output sends objects down the pipeline. See the difference and which one to use.
-
Fix “A positional parameter cannot be found that accepts argument” in PowerShell
PowerShell says a positional parameter cannot be found that accepts argument. Read which argument it names, then check for commands joined on one line, a path with a space and no quotes, a parameter name without its dash, or a list without commas.
-
Time a Command in PowerShell with Measure-Command
Time a command in PowerShell with Measure-Command, get just the seconds, average several runs, see the output it hides, and why Seconds is not the whole time.
-
Claude Code Permissions: Allow and Deny Rules in settings.json
Stop answering the same permission prompt. The allow, ask and deny lists in settings.json, the rule syntax with the space before the *, PowerShell rules, protecting .env, the 3 files the rules live in, and the modes behind Shift+Tab.
-
Unblock a Downloaded File in PowerShell (Unblock-File)
Remove the mark of the web from downloaded scripts and files with Unblock-File, see the Zone.Identifier stream with Get-Item -Stream, and unblock a whole folder.
-
Get Your IP Address in PowerShell
Get your IP address in PowerShell with Get-NetIPAddress, find the one adapter that matters with the default route, see gateway and DNS with Get-NetIPConfiguration, and look up your public IP.
-
PowerShell curl: Why -Uri and -OutFile Stopped Working
In Windows PowerShell 5.1 curl is an alias for Invoke-WebRequest. In PowerShell 7 it is not, it runs curl.exe, and the old flags either error or sit there asking for a password. Here is what to run in each.
-
Install a WSL Distro on Another Drive
C: is full and WSL wants to put another virtual disk on it. The WSL install command has a location option that puts a new distro on any drive you choose. The command, the check that it landed there, and what to do about the distros already on C:.