posts-powershell

Ignoring Empty Lines

Reading Text Files and Skipping Blank Lines To read in a text file and skip blank lines, try this: $file = 'c:\sometextfile.txt' Get-Content $file |...

  • Written By: ps1
  • Last Updated: April 22, 2025
  • 1 minute read