Contact Info

Crumbtrail

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

Set-Date - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Set-Date


Short description
Set-Date

Syntax
Set-Date [-Adjust] <TimeSpan> [-DisplayHint {Date | Time | DateTime}] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-Date [-Date] <DateTime> [-DisplayHint {Date | Time | DateTime}] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Set-Date cmdlet changes the system date and time on the computer to a date and time that you specify. You can s
pecify a new date and/or time by typing a string or by passing a DateTime or TimeSpan object to Set-Date. To specif
y a new date or time, use the Date parameter. To specify a change interval, use the Adjust parameter.