Results for “shell”
Small, practical examples. Search by task or narrow things down below.
Enumerate hashtable entries in a stable order
PowerShell: Sort entries by key when predictable output matters.
PowerShell✓ Tested
Escape a single URL parameter value
PowerShell: EscapeDataString encodes one value without treating it as a complete URL.
PowerShell✓ Tested
Escape plain text before placing it in HTML
PowerShell: HtmlEncode converts HTML delimiters to entities in ordinary text contexts.
PowerShell✓ Tested
Extract a known substring
PowerShell: Substring uses a zero-based starting index and a character count.
PowerShell✓ Tested
Filter pipeline values
PowerShell: Filter pipeline values using PowerShell 7.
PowerShell✓ Tested
Find differences between two collections
PowerShell: Compare-Object marks reference-only values with a left arrow and difference-only values with a right arrow.
PowerShell✓ Tested
Find matching files recursively
PowerShell: Select files explicitly and sort their names for predictable presentation.
PowerShell✓ Tested
Find the index of an array item
PowerShell: Array.IndexOf returns -1 when the requested item is absent.
PowerShell✓ Tested
Find the number of days in a month
PowerShell: DaysInMonth handles leap-year February correctly.
PowerShell✓ Tested
Format a bounded duration as hours minutes and seconds
PowerShell: TimeSpan can format duration components with escaped separators.
PowerShell✓ Tested
Handle a malformed JSON document
PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.
PowerShell✓ Tested
Handle an expected terminating error
PowerShell: Handle an expected terminating error using PowerShell 7.
PowerShell✓ Tested