Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the FileSystemObject's GetFile Method

Windows PowerShell

Definition: Returns an object reference to a File object, allowing you to retrieve file properties such as file creation date and file last accessed date.


Use the Get-Item cmdlet to retrieve a reference to a file. You can find out the properties available on that file by piping the reference to Get-Member.

$a = Get-Item c:\scripts\test.txt
$a | Get-Member

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