You can use a command like: Get-Content InputFile.txt -Tail n > OutputFile.txt Replace InputFile.txt with the file you want to get the data from. Replace n with the amount of lines you want to extract from the file. Replace the OutputFile.txt with what you would like the file to be named. The file will be placed wherever your current directory is in PowerShell.