PS C:\Scripts> New-Item .\test.txt -ItemType File
Directory: C:\Scripts
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 05/05/2014 11:16 0 test.txt
__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Get-Member -MemberType Property
TypeName: System.IO.FileInfo
Name MemberType Definition
---- ---------- ----------
Attributes Property System.IO.FileAttributes Attributes {get;set;}
CreationTime Property System.DateTime CreationTime {get;set;}
CreationTimeUtc Property System.DateTime CreationTimeUtc {get;set;}
Directory Property System.IO.DirectoryInfo Directory {get;}
DirectoryName Property System.String DirectoryName {get;}
Exists Property System.Boolean Exists {get;}
Extension Property System.String Extension {get;}
FullName Property System.String FullName {get;}
IsReadOnly Property System.Boolean IsReadOnly {get;set;}
LastAccessTime Property System.DateTime LastAccessTime {get;set;}
LastAccessTimeUtc Property System.DateTime LastAccessTimeUtc {get;set;}
LastWriteTime Property System.DateTime LastWriteTime {get;set;}
LastWriteTimeUtc Property System.DateTime LastWriteTimeUtc {get;set;}
Length Property System.Int64 Length {get;}
Name Property System.String Name {get;}
__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select *
PSPath : Microsoft.PowerShell.Core\FileSystem::C:\Scripts\test.txt
PSParentPath : Microsoft.PowerShell.Core\FileSystem::C:\Scripts
PSChildName : test.txt
PSDrive : C
PSProvider : Microsoft.PowerShell.Core\FileSystem
PSIsContainer : False
VersionInfo : File: C:\Scripts\test.txt
InternalName:
OriginalFilename:
FileVersion:
FileDescription:
Product:
ProductVersion:
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language:
BaseName : test
Mode : -a---
Name : test.txt
Length : 0
DirectoryName : C:\Scripts
Directory : C:\Scripts
IsReadOnly : False
Exists : True
FullName : C:\Scripts\test.txt
Extension : .txt
CreationTime : 05/05/2014 11:16:04
CreationTimeUtc : 05/05/2014 10:16:04
LastAccessTime : 05/05/2014 11:16:04
LastAccessTimeUtc : 05/05/2014 10:16:04
LastWriteTime : 05/05/2014 11:16:04
LastWriteTimeUtc : 05/05/2014 10:16:04
Attributes : Archive
__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTimeUtc
CreationTimeUtc
---------------
05/05/2014 10:16:04
__________________________________________________________________________________________________________________
PS C:\Scripts> (Get-ChildItem .\test.txt).CreationTimeUtc = get-date
__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTimeUtc
CreationTimeUtc
---------------
05/05/2014 10:19:07
__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTime
CreationTime
------------
05/05/2014 11:19:07