Results for “PowerShell”
Small, practical examples. Search by task or narrow things down below.
Run a first PowerShell statement
PowerShell: Run a first PowerShell statement using PowerShell 7.
PowerShell✓ Tested
Accept one typed value at a time from a pipeline
PowerShell: An advanced function uses process to handle each pipeline item.
PowerShell✓ Tested
Accumulate pipeline input across begin process and end
PowerShell: Keep initialization and final output separate from per-item work.
PowerShell✓ Tested
Add a calculated property during selection
PowerShell: A calculated property can derive a value while retaining selected original properties.
PowerShell✓ Tested
Append a line while keeping earlier content
PowerShell: Add-Content appends using an explicitly selected encoding.
PowerShell✓ Tested
Append an item to a small array
PowerShell: The plus-equals operator builds a new array; use a generic list for repeated large additions.
PowerShell✓ Tested
Assign a value to a variable
PowerShell: Assign a value to a variable using PowerShell 7.
PowerShell✓ Tested
Build a mutable generic list
PowerShell: A generic list supports repeated additions without copying an entire array each time.
PowerShell✓ Tested
Calculate a file’s SHA-256 digest
PowerShell: Get-FileHash hashes bytes without requiring the caller to load the whole file.
PowerShell✓ Tested
Calculate a simple total
PowerShell: Calculate a simple total using PowerShell 7.
PowerShell✓ Tested
Capture a command’s success-stream output
PowerShell: Assignment collects output values without requiring text redirection to a file.
PowerShell✓ Tested
Check a string prefix using ordinal comparison
PowerShell: Supply an explicit comparison rule for protocol identifiers.
PowerShell✓ Tested