Powershell - Read Text File



Cmdlet

Get-Content cmdlet is used to read content of a text file.

In this example, we're reading content of test.txt.

Get-Content D:\temp\test\test.txt 

Output

You can see following output in PowerShell console.

Welcome to TutorialsPoint
powershell_files_io.htm
Advertisements