In this powershell tip post, let us see how to find the current UTC time. There are several ways available to do this but one easy and simple way I found is by using [System.DateTime] class.
[System.DateTime]::UtcNow
This displays the current UTC date time information. See below screenshot for easy understanding.
Alternatively you can try below code as well.
$datetime = Get-Date $datetime.ToUniversalTime()
Please subscribe to this blog for more such tips.
Comments on this entry are closed.
Format UTC date time with:
(Get-Date).ToUniversalTime().ToString(‘yyMMddTHHmmss’)