Partager via


PowerTip: Customize How PowerShell Displays a Date

Summary : Easily customize the way Windows PowerShell displays a date.
How can I use Windows PowerShell to easily display the date as day-dash-month-dash-four-digit year?
Use the Get-Date cmdlet,specify a custom format by using the Format parameter, and use dd for the date, M for the month and yyyy for a four-digit year (this is case sensitive):
Get-Date -Format "dd-M-yyyy"...(read more)