How can I convert a hashtable to an array of strings? Suppose $l_table is a hashtable. If I try
$l_array = $l_table | format-table
then $l_arra
The hash is just a Hashtable so it has a keys and a values property.
$hash = @{} $hash["foo"] = "bob" $hash.Values $hash.Values | Out-string
If you want to get the enumerator it will return you the keyvaluepair
$hash.GetEnumerator() |%{$_ | out-string}