PowerShell: Output Windows Services to JSON file

A simple one-liner for outputting Windows Service properties to a JSON file.

Get-Service * | ConvertTo-Json | Out-File services.json

And here are some approaches for getting string representations of the enum integers:
[Stack Overflow] Powershell – Retain Complex objects with ConvertTo-Json


Alternative command using Get-WmiObject — this doesn’t require any enum serialisation workarounds:

Get-WmiObject win32_service | ConvertTo-Json > services.json

Example html page using Emmet

Emmet is my tool of choice when handcrafting html in Sublime Text.

Here is a common snippet I use for setting up a (quick-and-dirty) boilerplate html page:

html>head+body>h$[title="Demo"]{Demo}+ul*5>li.item-$${Item $$}*5