FIND YOUR NEXT FEW LINES
Results for “power”
Small, practical examples. Search by task or narrow things down below.
128 snippets foundClear filters
Replace repeated whitespace
Normalize runs of whitespace to one space.
regex✓ Tested
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
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 and read a setting in EEPROM
Persist one byte using the update operation.
EEPROM✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested