It provides various date functions in powershell.

get-date is an cmdlet that returns current date and time.

$currentDate=get-date
write-host $currentDate # Outputs 18-02-2024 17:33:09

It prints the data in a long format of Date and time

get-date is an object that contains properties and methods.

You can get all properties and methods of get-date using below command

get-date |get-member