| external help file | PSScriptTools-help.xml |
|---|---|
| Module Name | PSScriptTools |
| online version | |
| schema | 2.0.0 |
Convert a local datetime to universal time.
ConvertTo-UTCTime [[-DateTime] <DateTime>] [<CommonParameters>]Convert a local datetime to universal time. The default is now but you can specify a datetime value.
This command was introduced in v2.3.0.
PS S:\PSScriptTools> get-date
Monday, March 4, 2019 12:51:47 PM
PS S:\PSScriptTools> ConvertTo-UTCTime
Monday, March 4, 2019 5:51:49 PMEnter a Datetime value
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: now
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/