~/talk

Writing your own CLI tools with PowerShell: A case study of...

links:none on file
slides:none on file

Built a CLI called SQLTop replicates top for SQL Server that shows live queries, CPU, threads and blocking and can kill sessions; implemented in PowerShell 5.1 using .NET Sql classes instead of Invoke-SqlCmd, runs remotely from a jump box, and is open sourced on GitHub under channeladvisor. UI uses runspaces + synchronized Hashtable to gather data in parallel (used for scaling to hundreds of DBs and 250–300 concurrent deployments), a double-buffered redraw to avoid flicker, and Console.RawUI ReadKey/KeyAvailable for single‑key menus; demos include a Foreman load generator and it works during the presentation.

AI-written summary · about

  1. 0:00Intro
  2. 3:02Why build tools
  3. 5:55SQL Top
  4. 11:57Challenges
  5. 12:24User Experience
  6. 13:23System Quirks
  7. 14:55Invoke SQL Command
  8. 17:22Flicker Free
  9. 23:17Sharing Data in State
  10. 30:17Running Scripts
  11. 36:21Code Samples
  12. 38:34Color
  13. 42:29SQLTop
  14. 45:25ReadKey
  15. 47:35ReadKey Demo
  16. 51:54Menu Module
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.