PowerShell: Get File Content

By Xah Lee. Date: . Last updated: .

Print File Content

Get-Content myfile
# print first 50 lines of file
Get-Content myfile | select -first 50
# print last 50 lines of file
Get-Content myfile | select -last 50

for scripting use, see PowerShell: Read File

PowerShell, Working on Files

PowerShell: Create New File/Dir