Converting the FileSystemObject's OpenTextFile Method

Definition: Open a file and reference the contents of the file.

OpenTextFile

See OpenAsTextStream. The Get-Content cmdlet will retrieve the contents of a file:

Get-Content test.txt

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