Skip to content

Glossary: Command Line for IT: Bash and PowerShell

Get-Date

Also written: Get-Date -Format, AddDays

The PowerShell cmdlet that gives the current date and time. -Format yyyy-MM-dd prints it as year-month-day, and (Get-Date).AddDays(-1) is this time yesterday.

Where the book teaches it