your-command | select -First <number of lines or array-items> #for example Get-Process | select -First 3 cat filename | select -First 3