Converting the FileSystemObject's ReadAll Method


Windows PowerShell


Definition: Read the entire contents of a text file.

ReadAll


It doesn’t get any easier than this. Just pass the path to the text file to the Get-Content cmdlet:


Get-Content C:\Scripts\test.txt


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Show: