Created
February 21, 2020 00:43
-
-
Save Luiz-Monad/cff4c86575f8136ea8745ef6cd3864c1 to your computer and use it in GitHub Desktop.
ConvertTo-Hashtable onliner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertTo-Hashtable { process { $o = @{}; $i = $_; $i | gm -MemberType *Property | % { $o.($_.name) = $i.($_.name) }; $o } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment