Powershell - Date
Management
Get
Get-Date -UFormat "%Y-%m-%d_%H:%M"
2018-06-01_13:24
For the flags, see the note at the end
Diff
$start_time = Get-Date
# Do whatever
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"