Show file creation and modification dates with Get-Item

The three NTFS timestamps and how to read them all in one line of PowerShell.

WindowsmetadataFilespowershellLow risk
Run Get-Item <file> | Select-Object CreationTime, LastWriteTime, LastAccessTime to display all three timestamps.

01Command

Command
$ Get-Item 'C:\Temp\report.xlsx' | Select-Object Name, CreationTime, LastWriteTime, LastAccessTime

02What it does

LastWriteTime is what dir and Explorer show as 'Date modified'; CreationTime is when the file was created at this location, and LastAccessTime is often stale because Windows disables access-time updates by default for performance. The properties are settable, which is also how scripts normalize timestamps after a copy. Add -Force to include hidden and system files.

03Risk

RiskLow risk
RequirementsPowerShell

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-Item | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Get-Item returning the object at a path, whose FileSystemInfo members include CreationTime, LastWriteTime, and LastAccessTime.
  • Get-Item - PowerShell
    SS64 · technical · 2026-09-17
    Evidence: SS64 describes Get-Item returning FileSystemInfo objects exposing the timestamp properties, including via .GetType() inspection.

Last verified: 2026-09-17 · Category: Files & Folders

06Related solutions