
PowerShell Sort-Object: Order Files by Size, Date, or Name in One Pipeline
A disk is filling up and you need to know which files are eating it. Or a log folder has 400 files...
Tag archive

A disk is filling up and you need to know which files are eating it. Or a log folder has 400 files...

You have 240 photos named IMG_0001.JPG through IMG_0240.JPG, or a folder of logs called report final...

Most broken PowerShell scripts I've debugged didn't fail on some clever logic. They failed on a path...

The PowerShell Measure-Object cmdlet turns a pile of output into a number. How many lines are in this...

The PowerShell Test-Path cmdlet answers one question: does this path exist? Use it before you read,...

The PowerShell Get-Content cmdlet reads text from a file. For day-to-day ops you rarely need the...

The PowerShell Clear-Content cmdlet empties a file’s contents but keeps the file itself. The path...

Here is a nine-line script that does everything the strict-mode articles tell you to. set -euo...
10 Bash Scripts That Gave Me My Weekends Back I'm not going to sell you on Kubernetes for...
Worried about your laptop battery degradation? BatteryHealth is a lightweight PowerShell script that...

The PowerShell Add-Content cmdlet appends text to a file. Use it when you want to keep existing lines...

The PowerShell Select-String cmdlet finds text inside files — the same job grep does on Linux/macOS...