FIND YOUR NEXT FEW LINES
Results for “PowerShell”
Small, practical examples. Search by task or narrow things down below.
125 snippets foundClear filters
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sum a collection
Calculate a total with Measure-Object.
Measure-Object✓ Tested
Transform each item in a collection
Build a result array with a foreach expression.
foreach✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested