Powershell hashtable keys with special characters

Question:

I’m having trouble trying to access a hashtable with a / in the key. In my case the keys are mime types, and a simple example of the hashtable looks like:

When I try to do access by the Key name, I am not getting any results:

What is going on here, and how to I use this key?

Answer:

In my opinion the Key is not a string but an object? I have no problems getting the value both ways:

Source:

Powershell hashtable keys with special characters by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply