epacke / BigIPReport

Overview of your loadbalancer configuration
https://loadbalancing.se
8 stars 2 forks source link

REST: entries with different case broken #165

Closed timriker closed 4 years ago

timriker commented 4 years ago

Invoke-RestMethod does not handle mixed case json entries. If a rest service responds with: { "key": "value", "KEY": "VALUE" } The response will fail to get converted and will end up as just a string. Having two virtual servers, pools, members, datagroup, profiles, etc. that are identical in name except for different case will trigger this issue. This is due to powershell trying to be case insensitive.

The work around I've found is to use: Invoke-WebRequest | ConvertFrom-Json -AsHashtable Which is only available in PowerShell 6. Windows 10 at present only includes Powershell 5.1

epacke commented 4 years ago

I'd say that this is likely not very common for people to have the same name on objects, but still... This part is annoying about Powershell. They do so many things right, but stumble with the standards.

timriker commented 4 years ago

fix in 66750a919c9de746fe1ca3ca39a684411f4f3680