Author: Peter Whyte
-
Voice Mode in Claude Code: Turn On Dictation With /voice
The /voice command turns on voice dictation in Claude Code: speak your prompt and it is typed into the input. How to turn it on, hold versus tap, and what it needs on Windows and WSL.
-
How to Filter Git Log History
To filter Git history, add options to git log: –author for who, –since and –until for when, –grep for words in the commit message, -S for code that was added or removed, and — <path> for a file or folder. They combine, and –oneline keeps the output to one line per commit. Run these in […]
-
Markdown Comments, Headers and Code Blocks: A Quick Reference
How to write a comment in Markdown that does not show when rendered, plus headers, emphasis, lists, blockquotes, code blocks, links, images and tables, with a copyable template.
-
Call the Claude API From PowerShell
Send a prompt to Claude from PowerShell with Invoke-RestMethod: the API key in an environment variable, a JSON body built with ConvertTo-Json -Depth, UTF-8 in Windows PowerShell 5.1, reading the text from the reply, and handling errors.
-
Check an AI-Written PowerShell Script Before You Run It
Before you run a PowerShell script an AI wrote, check whether -WhatIf really works, read the param block, add Set-StrictMode, run PSScriptAnalyzer and use Get-Command to see what each command is.
-
Store API Keys Safely in PowerShell
Keep API keys out of your scripts with SecretManagement and SecretStore: Register-SecretVault, Set-Secret, Get-Secret -AsPlainText, checking your history for a pasted key, and the trade-off for scheduled tasks.
-
ConvertTo-Json Depth: Why Nested JSON Shows System.Collections.Hashtable
ConvertTo-Json only writes two levels by default, so nested data becomes System.Collections.Hashtable. Fix it with -Depth, why 5.1 gives no warning, API request bodies, the limit of 100, and the one-item array gotcha.
-
How to Shut Down a Computer with PowerShell and CMD
Shut down a Windows computer or server from PowerShell with Stop-Computer or from CMD with shutdown /s, check it first with -WhatIf, and cancel a scheduled shutdown with shutdown /a.
-
How to Check the Last Reboot Time of a Windows Computer
Check the last reboot time of a Windows computer with Get-Uptime in PowerShell 7, Get-CimInstance in Windows PowerShell 5.1, systeminfo in the Command Prompt, or Task Manager, and find out why it restarted.