Skip to main content
Version: 1.0.8

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. Since PowerShell 7.7 ships no MSI package, this means the latest 7.6 LTS release.

Syntax

Update-PS7 [-Force]
note
  • Reads PowerShell's tools/metadata.json, the same file the upstream install-powershell.ps1 script reads. With -UseMSI the script installs the release in ReleaseTag (the latest 7.6 LTS), so Update-PS7 compares your version against that one.
  • Runs the installer with -UseMSI. The upstream script no longer accepts a -Version parameter, so version pinning isn't possible.
  • If the installed version already matches that release, it warns and skips the install; use -Force to reinstall anyway.
  • If a newer stable release exists without an MSI package (for example 7.7), it warns you: install it by hand if you need it.
  • If the metadata can't be read, it falls back to running the installer directly.
  • Ideal for keeping servers and managed endpoints on the latest PowerShell 7.6 LTS, installed machine-wide.
  • 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.

What if I'm already on the latest version?​

Update-PS7 compares your running version against the latest MSI release (7.6 LTS) and skips the install with a warning. Pass -Force to reinstall regardless.

Why doesn't Update-PS7 install PowerShell 7.7?​

Microsoft no longer publishes MSI packages from PowerShell 7.7 on, only ZIP and MSIX. Update-PS7 stays on 7.6 LTS, which is supported until November 14, 2028. The reasons are in this post.