Title: Please help in converting time zone using powershell when source time is property of an element
Tags: powershell;time;timezone
Question: Somebody please help me in converting the time zone as said in the description.
A little explanation on code will be great help in understanding the concept.
Thanks in advance!

```PS&gt; Get-HotFix -id KB4537572 | select InstalledOn

InstalledOn
-----------
3/4/2020 12:00:00 AM


PS&gt; $from = (Get-HotFix -id KB4537572 | select InstalledOn)

PS&gt; $from

InstalledOn
-----------
3/4/2020 12:00:00 AM


PS&gt; $to = 'Central Europe Standard Time'

PS&gt; [System.TimeZoneInfo]181a:6c1c:918f:f3a4:2e8c:61d6:1a08:6b16onvertTimeBySystemTimeZoneId( $from , $to )
Cannot find an overload for "ConvertTimeBySystemTimeZoneId" and the argument count: "2".
At line:1 char:1
+ [System.TimeZoneInfo]181a:6c1c:918f:f3a4:2e8c:61d6:1a08:6b16onvertTimeBySystemTimeZoneId( $from , $to )
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
```

Comment: In short: [`Select-Object`](https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/select-object) (`select`) returns _a `[pscustomobject]` instance_ that has the _requested properties_ - even when you're only asking for a _single_ property. To get only that property's _value_, use `-ExpandProperty ` instead - see the [linked answer](https://stackoverflow.com/a/48809321/45375) for details and alternatives.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:03/12/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<powershell><time><timezone>', 'Title': 'Please help in converting time zone using powershell when source time is property of an element', 'ViewCount': 31, 'id': 60659161, 'user_AboutMe': None, 'user_AccountId': 6150487.0, 'user_DisplayName': 'kaalel', 'user_Reputation': 21.0, 'user_Views': 0.0, 'user_id': 4795014.0}}