I need to convert a date in Windows PowerShell to the ISO 8601 format.
In Linux/Unix it was no problem with
TZ=0 date -d \"\"
Get-Date supports Unix formatting strings with the -UFormat parameter. You can reuse it:
-UFormat
Get-Date -UFormat '+%Y-%m-%dT%H:%M:%S.000Z'