Get lastboouptime in EST time zone.

Hi,
When I use Get-CimInstance to get lastbootuptime for a server I get the output in my laptop time zone, but I need it in EST, please help.

You’re also going to have to query the laptop’s time zone and do the conversion math.

The following works on my machine:

$os = Get-CimInstance -ClassName Win32_OperatingSystem -Property LastBootUpTime

$timeZoneInfo = [System.TimeZoneInfo]::FindSystemTimeZoneById('Eastern Standard Time')
[System.TimeZoneInfo]::ConvertTimeFromUtc($os.LastBootUpTime.ToUniversalTime(), $timeZoneInfo)

Thank you Dan it works!