Export (0) Print
Expand All
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.

GetFile


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
Show:
© 2014 Microsoft