I'm trying to set this string as my key:
a -long " string that - has. double and single quotes and dashes and dots
This string is the product of String Builder ToString() method.
The Hashtable is initialized like this: $myHashtable = @{ }
This is the error: Cannot convert value "stringAbove" to type "System.Int32". Error: "Input string was not in a correct format."
I tried escaping the double quotation marks with a backtick. But got still the same error.
$resultFromToString = $myBuilder.ToString()
$myHashtable[$resultFromToString] = @{
One = $one;
Two = $two;
}