CompTIA CySA+CS0-002 – Question100

Massivelog.log has grown to 40GB on a Windows server. At this size, local tools are unable to read the file, and it cannot be moved off the virtual server where it is located. Which of the following lines of PowerShell script will allow a user to extract the last 10,000 lines of the log for review?

A.
tail -10000 Massivelog.log > extract.txt
B. info tail n -10000 Massivelog.log | extract.txt;
C. get content './Massivelog.log' -Last 10000 | extract.txt
D. get-content './Massivelog.log' -Last 10000 > extract.txt;

Correct Answer: C