I have found following code for reading hashtable from a text file with key=value
pairs.
$value = Get-Content $Path | Out-String | ConvertFrom-StringData
I have not found the inverse operation though how to write the hashtable back to the text file in the same format. I use the following code
$values.GetEnumerator() | ForEach-Object { "{0}={1}" -f $_.Name,$_.Value } | Set-Content $Path
It works fine. I just wonder if there is some more straight forward solution.