PowerShell: Get Current System Date and Time

Need to check the current system date and time - for timestamping a script's output, logging, or confirming the clock is correctly synced? This one-liner pulls it straight from the system.

Prerequisites:

  • Privileges: None
  • Module: Built-in, no import needed

Quick Command:

Get-Date

Example Output:

Sunday, July 27, 2026 2:15:33 PM
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

How It Works:

  • Get-Date returns the current local date and time as configured on the system - it reflects whatever time zone is set (covered in the previous time zone article), not necessarily UTC.
  • The default output is a full, readable date/time string, but the underlying object contains individual properties (Year, Month, Day, Hour, etc.) that can be accessed separately when needed.