Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Get-Date

Get-Date - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Gets the current date and time.

Get-Date [-Format <string>] [[-Date] <DateTime>] [-Day <int>] [-DisplayHint {Date | Time | DateTime}] [-Hour <int>]
 [-Minute <int>] [-Month <int>] [-Second <int>] [-Year <int>] [<CommonParameters>]

Get-Date [-UFormat <string>] [[-Date] <DateTime>] [-Day <int>] [-DisplayHint {Date | Time | DateTime}] [-Hour <int>
] [-Minute <int>] [-Month <int>] [-Second <int>] [-Year <int>] [<CommonParameters>]

The Get-Date cmdlet gets a DateTime object that represents the current date or a date that you specify. It can form
at the date and time in several Windows and UNIX formats. You can use Get-Date to generate a date or time character
 string, and then send the string to other cmdlets or programs.