timezone of PS

Glenn Maxwell 12,876 Reputation points
2023-06-08T20:31:07.5266667+00:00

Hi All

When i connect exchange online powershell what timezone will it take. I am connecting exchange online powershell from one of my server, the server timezone is in PDT. will powershell take PDT or UTC time.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,190 questions
Exchange | Hybrid management
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2023-06-08T21:20:41.7+00:00

    All times are stored as UTC. They're converted to local time based on the time zone of the local machine.

    In PowerShell, the creation of a DateTime object, by default, converts the time to local time unless you explicitly ask for UTC. If you write a DateTime object to a file, the time is NOT converted to UTC. That's something you must do unless the DateTime object's already in UTC.

    You can use the "Kind" property of the DateTime object to discover if its UTC or Local.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.