Skip to main content

Utilities

General-purpose helpers for everyday tasks. This page groups small utilities that don't need a dedicated section yet.

For full details and examples, run Get-Help Join-ClipboardLines -Detailed, Get-Help Update-CSVDelimiter -Detailed, or Get-Help Update-PS7 -Detailed.

Join-ClipboardLines

Join-ClipboardLines turns a list of lines from the clipboard into a single PowerShell-ready string.

Syntax

Join-ClipboardLines [-Separator <String>] [-Quote <String>] [-RemoveDuplicates] [-ShowOutput] [-NoClipboard]
ParameterDescriptionRequiredDefault
SeparatorString used between items.No,
QuoteQuote character to wrap each item (empty string disables quoting).No"
RemoveDuplicatesRemove duplicate lines before joining.NoFalse
ShowOutputWrite the joined string to the pipeline.NoFalse
NoClipboardDo not copy the output back to the clipboard.NoFalse

Examples

# Join lines as a PowerShell-ready string and copy the result back to the clipboard (default)
Join-ClipboardLines

# No quotes, custom separator
Join-ClipboardLines -Separator '; ' -Quote ''

# Remove duplicates before joining
Join-ClipboardLines -RemoveDuplicates

# Show the joined string in the output
Join-ClipboardLines -ShowOutput

# Return output only (no clipboard write)
Join-ClipboardLines -NoClipboard
note
  • Empty lines are ignored.
  • When -RemoveDuplicates is used, the first occurrence is kept and order is preserved.
  • The command prints the number of joined items, and (if enabled) the number of duplicates removed.
  • The joined string is only written to the pipeline when -ShowOutput is used.
  • Copies output to the clipboard by default (unless -NoClipboard is used).
  • Requires clipboard availability in the current session.

Update-CSVDelimiter

Update-CSVDelimiter switches CSV files between comma and semicolon separators while preserving encoding.

Syntax

Update-CSVDelimiter -FilePath <String> [-Encoding <String>] [-ToComma] [-ToSemicolon]
ParameterDescriptionRequiredDefault
EncodingInput/output encoding.NoISO-8859-15
FilePathPath to the CSV file.Yes-
ToCommaConvert ; to ,.NoFalse
ToSemicolonConvert , to ;.NoFalse

Examples

# Convert semicolons to commas
Update-CSVDelimiter -FilePath 'C:\path\to\file.csv' -ToComma

# Convert commas to semicolons with a custom encoding
Update-CSVDelimiter -FilePath 'C:\path\to\file.csv' -Encoding 'UTF8' -ToSemicolon
note
  • Default encoding is ISO-8859-15.
  • The cmdlet overwrites the target file with the updated delimiter.

Update-PS7

Update-PS7 runs the official Microsoft helper script to install or upgrade PowerShell 7 via MSI.

Syntax

Update-PS7
note
  • Downloads aka.ms/install-powershell.ps1 and executes it with -UseMSI.
  • Ideal for keeping managed endpoints on the latest stable PowerShell release.
  • The installer UI appears; run from an elevated session for system-wide upgrades.
  • On Windows PowerShell 5.1, the function enforces TLS 1.2 before downloading.

Questions and answers

Does Update-PS7 install silently?

No. It downloads and runs the official Microsoft script with the interactive MSI (-UseMSI). Use an elevated session for system-wide upgrades.