Changing a Computer’s Date and Time
One way to change the date/time on a computer is to use the -date parameter followed by the new date and time. For example, suppose you want to set the date and time to 1:11 AM on June 6, 2015. Here’s how you do that:
[crayon-6a619ec1bda98509201389/]
Need to set the clock ahead exactly two days? This command uses the Get-Date cmdlet and the AddDays method to advance the clock two days:
[crayon-6a619ec1bda9f291627837/]
Other methods that can be used here include AddHours, AddMinutes, and AddSeconds. Need to set the clock back 1 hour due to Daylight Saving Time? Then simply set the clock back -1 (minus 1) hours, like this:
[crayon-6a619ec1bdaa1811088455/]
Alternatively, you can use the -adjust parameter to adjust the time using the format hours:minutes:seconds. For example, this command sets the clock ahead 1 hour and 11 minutes
[crayon-6a619ec1bdaa2052771221/]