Complete the code to read the content of a file named 'data.txt'.
Get-Content [1]The Get-Content cmdlet requires the file path as a string. So, the file name must be in quotes.
Complete the code to read the content of 'log.txt' and store it in a variable named $content.
$content = [1] 'log.txt'
Get-Content is the correct cmdlet to read file content in PowerShell.
Fix the error in the code to correctly read all lines from 'notes.txt'.
Get-Content -Path [1]The -Path parameter expects a string with the file name, so it must be quoted.
Fill both blanks to read the first 5 lines of 'report.txt' and store them in $lines.
$lines = Get-Content [1] -TotalCount [2]
The -TotalCount parameter limits the number of lines read. Use the correct file name and number of lines.
Fill all three blanks to read 'summary.txt', skip the first 2 lines, and store the rest in $content.
$content = Get-Content [1] | Select-Object -Skip [2] | [3]
Use Get-Content with the file name, then skip 2 lines, and convert the output to a string with Out-String.