PowerShell equivalent to cut

21 October 2025 - Thomas Damgaard

How to do the equivalent of Linux’ cut on Windows using PowerShell? This is how:

$filename = "sample.cfg"

Get-Content $filename | ForEach-Object {
    $_.split(":")[1]
}
Filed under: howto, tips

Back to article list