PowerShell Quick Tip: How to get PowerShell UTC time from local time. This is useful when you run PowerShell against systems in different time zones and don’t want to deal with client local time.
The [DateTime] object in PowerShell have the ToUniversalTime() method, which converts the current time of the object to UTC time.
(Get-Date).ToUniversalTime()
The local time of my computer is UTC+1, and the content of $DateTime contains that time. But executing the method ToUniversalTime() on $DateTime now shows the UTC time instead.