Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the FileSystemObject's ReadAll Method

Windows PowerShell

Definition: Read the entire contents of a text file.


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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft