The following works both in Windows PowerShell 5.1 and PowerShell 7.0 on Windows/OS X:
(Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffK")
2020-12-01T22:31:41.402Z
If you don't want your milliseconds, then format string would be "yyyy-MM-ddTHH:mm:ss.000K"