Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Set-Date

Set-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 »

Set-Date

Description
Set system time on the host system

Usage


Options


Example(s)
Add two days to the current system date, without changing the time:

PS C:\>Set-Date -Date (Get-Date).AddDays(2)

Set the current system time back by 30 minutes:

PS C:\>set-date -adjust -0:30:0

Advance the system time on the local computer forwards by 30 minutes:

PS C:\>$halfhr = new-timespan -minutes 30
PS C:\>set-date -adjust $halfhr