Get-Date - Powershell 1.0 CmdLet
ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »
Get-Date
Description
Get current date and time
Usage
Options
Example(s)
Retrieve the current date and time, but display only the date:
PS C:\>get-date -DisplayHint date
Retrieve the current date and time, display as a General short date/time:
PS C:\>get-date -format g
Display the day of the year:
PS C:\>(get-date).dayofyear
Display daylight savings and UTC:
PS C:\>$a = get-date
$a.IsDaylightSavingTime()
$a.ToUniversalTime()
Display the bios date of a remote machine using WMI:
PS C:\>$a = get-wmiobject win32_bios -computer SERVER64
$a | format-list -property Name, @{Label="BIOS Date "; `
Expression={$_.ConvertToDateTime($_.ReleaseDate)}}
The backtick character (`) is the line continuation character
