There are many ways to do this, depending on what you need. In this article I'm going to highlight 2 of them. 1. Function-style conversion: function ArrayToHash($a) Usage: ArrayToHash (Get-Process) 2. Filter-style conversion: filter ArrayToHash Usage: Get-Process | ArrayToHash |
Tech Blog >